mirror of
https://github.com/NexusOne23/noid-privacy.git
synced 2026-02-15 07:48:15 +01:00
Fix: Use direct env check for -Skip (Pester evaluates before BeforeAll)
This commit is contained in:
parent
745d808771
commit
75c6c76ba2
8 changed files with 22 additions and 30 deletions
|
|
@ -2,7 +2,6 @@ Describe "ASR Integration Tests" {
|
|||
BeforeAll {
|
||||
$script:ModulePath = Join-Path $PSScriptRoot "..\..\Modules\ASR"
|
||||
$script:ManifestPath = Join-Path $script:ModulePath "ASR.psd1"
|
||||
$script:IsCI = $env:GITHUB_ACTIONS -eq 'true' -or $env:CI -eq 'true'
|
||||
}
|
||||
|
||||
Context "Module Structure" {
|
||||
|
|
@ -21,7 +20,7 @@ Describe "ASR Integration Tests" {
|
|||
}
|
||||
|
||||
Context "DryRun Execution" {
|
||||
It "Should run in DryRun mode without errors" -Skip:$script:IsCI {
|
||||
It "Should run in DryRun mode without errors" -Skip:($env:GITHUB_ACTIONS -eq 'true') {
|
||||
# Skip on CI - requires Windows Defender and admin rights
|
||||
{ Invoke-ASRRules -DryRun -ErrorAction Stop } | Should -Not -Throw
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue