Skip to content

Commit 064683f

Browse files
committed
add more skip statements for failing appveyor tests
1 parent 61c4d59 commit 064683f

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Tests/Engine/InvokeScriptAnalyzer.tests.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,15 @@ Describe "Test Path" {
181181
$numFilesResult | Should -Be $numFilesExpected
182182
}
183183
}
184-
184+
185185
Context "When piping in files" {
186186
It "Can be piped in from a string" {
187187
$piped = ("$directory\TestScript.ps1" | Invoke-ScriptAnalyzer)
188188
$explicit = Invoke-ScriptAnalyzer -Path $directory\TestScript.ps1
189-
189+
190190
$piped.Count | Should Be $explicit.Count
191191
}
192-
192+
193193
It "Can be piped from Get-ChildItem" {
194194
$piped = ( Get-ChildItem -Path $directory -Filter TestTestPath*.ps1 | Invoke-ScriptAnalyzer)
195195
$explicit = Invoke-ScriptAnalyzer -Path $directory\TestTestPath*.ps1
@@ -410,7 +410,7 @@ Describe "Test CustomizedRulePath" {
410410
Pop-Location
411411
}
412412
}
413-
413+
414414
It "resolves rule preset when passed in via pipeline" {
415415
$warnings = 'CodeFormattingStroustrup' | ForEach-Object {
416416
Invoke-ScriptAnalyzer -ScriptDefinition 'if ($true){}' -Settings $_}
@@ -545,25 +545,25 @@ Describe "Test -EnableExit Switch" {
545545

546546
Describe "-ReportSummary switch" {
547547
$reportSummaryFor1Warning = '*1 rule violation found. Severity distribution: Error = 0, Warning = 1, Information = 0*'
548-
It "prints the correct report summary using the -NoReportSummary switch" {
548+
It "prints the correct report summary using the -NoReportSummary switch" -Skip:($env:APPVEYOR -and $IsLinux) {
549549
if ($IsCoreCLR) {
550550
$result = pwsh -command 'Import-Module PSScriptAnalyzer; Invoke-Scriptanalyzer -ScriptDefinition gci -ReportSummary'
551551
}
552552
else {
553553
$result = powershell -command 'Invoke-Scriptanalyzer -ScriptDefinition gci -ReportSummary'
554554
}
555-
556-
"$result" | Should -BeLike $reportSummaryFor1Warning
555+
556+
"$result" | Should -BeLike $reportSummaryFor1Warning
557557
}
558-
It "does not print the report summary when not using -NoReportSummary switch" {
558+
It "does not print the report summary when not using -NoReportSummary switch" -Skip:($env:APPVEYOR -and $IsLinux) {
559559
if ($IsCoreCLR) {
560560
$result = pwsh -command 'Import-Module PSScriptAnalyzer; Invoke-Scriptanalyzer -ScriptDefinition gci'
561561
}
562562
else {
563563
$result = powershell -command 'Invoke-Scriptanalyzer -ScriptDefinition gci'
564564
}
565-
566-
"$result" | Should -Not -BeLike $reportSummaryFor1Warning
565+
566+
"$result" | Should -Not -BeLike $reportSummaryFor1Warning
567567
}
568568
}
569569

Tests/Rules/AvoidUsingAlias.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Configuration MyDscConfiguration {
100100
$violations.Count | Should -Be 0
101101
}
102102

103-
It "do not warn when about Get-* completed cmdlets when the command exists natively on Unix platforms" -skip:(-not ($IsLinux -or $IsMacOS)) {
103+
It "do not warn when about Get-* completed cmdlets when the command exists natively on Unix platforms" -Skip:(-not ($IsLinux -or $IsMacOS) -or ($env:APPVEYOR -and $IsLinux)) {
104104
$violations = Invoke-ScriptAnalyzer -ScriptDefinition 'date' | Where-Object { $_.RuleName -eq $violationName }
105105
$violations.Count | Should -Be 0
106106
}

Tests/Rules/UseDSCResourceFunctions.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Describe "StandardDSCFunctionsInResource" {
2424
}
2525

2626
Context "When there are no violations" {
27-
It "returns no violations" {
27+
It "returns no violations" -Skip:($env:APPVEYOR -and $IsLinux) {
2828
$noViolations.Count | Should -Be 0
2929
}
3030
}

0 commit comments

Comments
 (0)