Implementing Missing Integration Tests: Provisioners and Docker

Finishing What We Started The Vagrant WSL2 provider had a test/integration_old/todos/ folder with unimplemented tests. Two big ones: test_provisioners.ps1 and test_docker.ps1. Both just had TODO comments saying what they should test. We’d already migrated the working tests to Pester 5.x format. The old homegrown PowerShell scripts worked fine - they just weren’t using a framework. Now we needed to implement these missing tests using the same Pester patterns. Provisioners: One Monolith, Five Tests The examples/provisioners/ directory had one massive Vagrantfile testing shell, file, ansible, chef, and salt provisioners all at once. To test them individually, we needed to split them up. ...

November 22, 2025 · 5 min · Zoltan Toma

Migrating Integration Tests to Pester: A PowerShell Testing Journey

The Testing Problem The vagrant-wsl2-provider had integration tests. They worked. They ran actual Vagrant commands and verified WSL2 distributions got created properly. But they were all custom PowerShell scripts with manual error handling, inconsistent output, and no real test framework. Here’s what a typical test looked like: try { Write-Host "Test: Starting VM..." -ForegroundColor Yellow vagrant up if ($LASTEXITCODE -ne 0) { throw "vagrant up failed" } Write-Host "[PASS] VM started" -ForegroundColor Green } catch { Write-Host "[FAIL] Test failed" -ForegroundColor Red exit 1 } It worked, but it was painful to maintain. Each test file had its own error handling, cleanup logic, and output formatting. And when something failed, you got a wall of red text with no clear indication of which specific assertion broke. ...

November 22, 2025 · 9 min · Zoltan Toma

Why I Chose Pester Over Custom Test Scripts (And Why Now)

The Testing Journey So Far When I started this Vagrant WSL2 Provider project, I knew unit tests would be a waste of tokens. My requirements change daily. AI pair programming with Claude means rapid iteration, constant refactoring, and features that evolve as I discover what WSL2 can and can’t do. So I skipped unit tests entirely and went straight to integration tests. Simple PowerShell scripts that do the real thing: ...

November 10, 2025 · 7 min · Zoltan Toma

Snapshots and Testing: Building Real Tests for a Vagrant Provider

The Testing Problem Nobody Talks About After getting Docker support working, I wanted to add snapshot functionality to the vagrant-wsl2-provider. But there was a nagging problem I’d been avoiding: how do you actually test a Vagrant provider plugin? The “proper” way would be to write Ruby unit tests with RSpec, mock all of Vagrant’s internals, and test each component in isolation. But here’s the thing - Vagrant is a massive gem with heavy dependencies. Just getting the test environment set up requires pulling in the entire Vagrant gem, which then requires native extensions, specific Ruby versions, and a whole dependency chain that’s… painful. ...

October 5, 2025 · 6 min · Zoltan Toma