Status: Done (2026-02-21)
Priority: Medium
Component: tools/pslib/wsl/wsl-manager.docker.Integration.Tests.ps1
Description:
Refactored integration tests to dot-source wsl-manager.ps1 and call Invoke-WslManager in-process instead of subprocess invocations. All operations with a wsl-manager wrapper now route through the public API. BeforeAll/AfterAll retain pslib calls for setup/teardown. Script Execution and Docker Setup contexts retain direct pslib calls (no wsl-manager wrapper exists).
Acceptance Criteria:
- No subprocess calls (
& $script:wslManagerPath) remain in the test file - No direct pslib calls for operations that have a wsl-manager wrapper (including State Validation)
-
Invoke-UpdateDistro,Invoke-CloneDistro,Invoke-SetupUserare exercised indirectly viaInvoke-WslManagerrouting -
Script ExecutionandDocker Setupcontexts retain their direct pslib calls unchanged - BeforeAll/AfterAll retain pslib calls for setup/teardown
- Output assertions updated to match in-process output (no null-char stripping or stream merging workarounds)
- All integration tests pass end-to-end