Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 1.17 KB

File metadata and controls

21 lines (16 loc) · 1.17 KB

← Back to Backlog

[REFACT-002] ✅ DONE - Fix Invoke-SetupUser CI guard scope and add explicit parameters

Status: Done (2026-02-20) Priority: Medium Component: tools/pslib/wsl/wsl-manager.ps1 Blocks: REFACT-003

Description: Added optional -Username and -Password parameters to Invoke-SetupUser. Moved the Test-RunningInCIorTestEnvironment guard to wrap only the prompting block, so programmatic calls with explicit parameters work even under Pester. Invoke-WslManager passes both params through for the "setup-user" command.

Acceptance Criteria:

  • Invoke-SetupUser -DistroName "debian-test" -Username "testuser" -Password "pass" calls New-WslUser without prompting, even under Pester
  • Invoke-WslManager -Command "setup-user" -Name "debian-test" -Username "testuser" -Password "pass" passes both params through
  • When -Username/-Password are omitted, interactive behaviour is unchanged
  • CI guard fires when prompting is needed but is bypassed when both params are provided
  • Unit tests cover both non-interactive and interactive paths
  • All existing tests continue to pass

← Back to Backlog