Skip to content

Commit 3d225ba

Browse files
bergmeisterChristoph Bergmeister
and
Christoph Bergmeister
authored
Make CI fail if tests fail and fix failing tests by making them Pester v5 compatible (#1553)
* Make CI fail if tests fail * Fix failing tests by making them Pester v5 compatible Co-authored-by: Christoph Bergmeister <[email protected]>
1 parent 420ef88 commit 3d225ba

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Tests/Rules/AvoidUsingDoubleQuotesForConstantString.tests.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
$settings = @{
2-
IncludeRules = @('PSAvoidUsingDoubleQuotesForConstantString')
3-
Rules = @{
4-
PSAvoidUsingDoubleQuotesForConstantString = @{
5-
Enable = $true
1+
BeforeAll {
2+
$settings = @{
3+
IncludeRules = @('PSAvoidUsingDoubleQuotesForConstantString')
4+
Rules = @{
5+
PSAvoidUsingDoubleQuotesForConstantString = @{
6+
Enable = $true
7+
}
68
}
79
}
810
}

tools/appveyor.psm1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ function Invoke-AppveyorTest {
124124
$configuration = [PesterConfiguration]::Default
125125
$configuration.CodeCoverage.Enabled = $false
126126
$configuration.Output.Verbosity = 'Normal'
127+
$configuration.Run.Exit = $true
127128
$configuration.Run.PassThru = $true
128129
$configuration.Run.Path = $testScripts
129130
$configuration.TestResult.Enabled = $true

0 commit comments

Comments
 (0)