diff --git a/CHANGELOG.md b/CHANGELOG.md index 33b2038..8cac9a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,6 +100,9 @@ entries are carried over from the manifest's release notes. ### Fixed +- A test of the confirm preference inside a run starts the 32-bit host, which is emulated on the + ARM64 runner, and the run there sometimes took longer than the test's timeout of 60 seconds. + The run has 300 seconds now, the default of the commands. - A test of `Get-IslAgentLogEvent` read the event table before anything had built it, so it failed whenever the shuffled order of the CI run put it first in its file. It builds the table first. - With `$WhatIfPreference` set in the caller's session, the runtime harness did neither a preview diff --git a/Tests/Unit/Module.WhatIf.Tests.ps1 b/Tests/Unit/Module.WhatIf.Tests.ps1 index 82b2227..0b09251 100644 --- a/Tests/Unit/Module.WhatIf.Tests.ps1 +++ b/Tests/Unit/Module.WhatIf.Tests.ps1 @@ -229,14 +229,16 @@ Describe 'What -WhatIf does across the module' -Tag 'Unit', 'Contract' { # After a Yes to -Confirm the preference is still Low in the command's scope, and the # functions it calls see it. With only -WhatIf pinned, the run folder and the copy each # asked again; here, where nobody can answer, they failed, and the host was started on - # a copy that was never made + # a copy that was never made. The run stays in the 32-bit host: on the ARM64 runner + # it is emulated, and this is the one unit test that starts it for real. Its start + # there took longer than 60 seconds, so the run has the commands' default of 300 (#98) $probe = New-MarkerScript -Name 'ConfirmLow' $run = Invoke-CallerScript -Statement @( "`$result = & (Get-Module IntuneScriptLab) {" " param(`$Path)" " `$ConfirmPreference = 'Low'" " `$runSplat = @{ Path = `$Path; Architecture = 'x86'; Context = 'User'; Phase = 'detect' }" - " Invoke-IslScriptRun @runSplat -TimeoutSeconds 60" + " Invoke-IslScriptRun @runSplat -TimeoutSeconds 300" "} '$($probe.Script)'" "'exit code: ' + `$result.ExitCode" )