diff --git a/ops/platform-acceptance/windows.ps1 b/ops/platform-acceptance/windows.ps1 index becae29..bd4b226 100644 --- a/ops/platform-acceptance/windows.ps1 +++ b/ops/platform-acceptance/windows.ps1 @@ -52,9 +52,12 @@ function Assert-DistroVersion([string] $ExpectedVersion) { # which ended the PowerShell string and executed `systemctl` on Windows. # Substitute only the already-validated semver after constructing the exact # bash command, so every service/version assertion really runs inside WSL. + # 1Helm bundles its own Node at the installed /opt/1helm/node-current + # contract path; there is no global `node` on the distro PATH, so invoke + # the bundled binary by absolute path. $command = @' test "$(systemctl is-active 1helm.service)" = active -test "$(node -p 'require("/opt/1helm/current/package.json").version')" = '__EXPECTED__' +test "$(/opt/1helm/node-current/bin/node -p 'require("/opt/1helm/current/package.json").version')" = '__EXPECTED__' '@ Invoke-Distro ($command.Replace('__EXPECTED__', $ExpectedVersion)) } diff --git a/test/phase4-platform-acceptance.mjs b/test/phase4-platform-acceptance.mjs index e063a2f..4845f61 100644 --- a/test/phase4-platform-acceptance.mjs +++ b/test/phase4-platform-acceptance.mjs @@ -212,6 +212,7 @@ test("Windows code publishes no artifact/signing claim and requires honest reboo assert.match(windows, /apply-linux-release\.sh/); assert.match(windows, /function Assert-DistroVersion/); assert.equal((windows.match(/Assert-DistroVersion \$(?:Version|PreviousVersion)/g) || []).length, 4); + assert.match(windows, /\/opt\/1helm\/node-current\/bin\/node/); assert.match(windows, /UTF8Encoding\(\$false\)/); assert.match(windows, /\[IO\.File\]::WriteAllText/); assert.match(windows, /\/bin\/bash -lc "bash '\$scriptInDistro'"/);