Commit f9982e7
fix: Validate PSScriptAnalyzer availability and harden WhatIf tests (#36)
* fix: Skip PSScriptAnalyzer install on cache hit
The lint job was unconditionally running Install-Module even when the
module was already restored from cache. This caused Install-Module
-Force to conflict with the already-loaded cached module, triggering a
NullReferenceException in PSScriptAnalyzer.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Validate PSScriptAnalyzer availability and harden WhatIf tests
Replace GitHub Actions cache-hit conditional with runtime module
availability check to handle corrupt or empty caches gracefully.
Refactor WhatIf integration tests to assert on specific collection
titles and IDs instead of counts to prevent flaky failures from
concurrent server state changes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Address review feedback from Copilot
Remove unused cache step ID, fix misleading log message, and use
GUID instead of Get-Random for WhatIf test collection title.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Validate PSScriptAnalyzer importability beyond module discovery
Strengthen the cache validation by attempting a full Import-Module and
verifying Invoke-ScriptAnalyzer is available, rather than relying solely
on Get-Module -ListAvailable which only checks file presence.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Create dedicated collection for Remove WhatIf test
The test was picking an arbitrary existing collection which could be
deleted by concurrent test cleanup. Create a dedicated collection,
verify it survives the WhatIf, then clean it up in a finally block.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 1cfb5cb commit f9982e7
2 files changed
Lines changed: 33 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
35 | 51 | | |
36 | 52 | | |
37 | 53 | | |
| |||
Lines changed: 15 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | | - | |
424 | | - | |
| 423 | + | |
| 424 | + | |
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
429 | | - | |
| 428 | + | |
| 429 | + | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
434 | | - | |
435 | | - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
| 438 | + | |
438 | 439 | | |
439 | | - | |
440 | | - | |
| 440 | + | |
| 441 | + | |
441 | 442 | | |
442 | | - | |
443 | | - | |
| 443 | + | |
| 444 | + | |
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
| |||
0 commit comments