Commit 2ffd174
committed
ci: fix Pester integration test failing in BeforeAll/AfterAll
The dynamic `-Skip:(-not $script:isWindows)` on the `It` block was
evaluated during Pester discovery, before `BeforeAll` had run, so the
variable was always `$null` and the skip expression always `$true`.
That cascaded into the `AfterAll` calling `Test-Path -LiteralPath $null`
which throws ArgumentNullException — the failure surface in CI.
Remove the dynamic skip (the `-Tag 'Integration','Windows'` on the
Describe already lets non-Windows local runs filter it out via
`-ExcludeTag`), and guard the AfterAll cleanup against a null path.1 parent ccb9d2d commit 2ffd174
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | | - | |
81 | | - | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | | - | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
98 | | - | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
0 commit comments