Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions Tests/Unit/Module.WhatIf.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down