Skip to content

Commit fa5ecf5

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
fix test
1 parent 3932584 commit fa5ecf5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

dsc/tests/dsc_config_test.tests.ps1

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@ Describe 'dsc config test tests' {
2121
family: Windows
2222
'@
2323

24-
$out = dsc config test -i $configYaml | ConvertFrom-Json
25-
$LASTEXITCODE | Should -Be 0
26-
24+
$out = dsc config test -i $configYaml 2> "$TestDrive/trace.log" | ConvertFrom-Json
2725
if ($IsWindows) {
26+
$LASTEXITCODE | Should -Be 0
2827
$out.results[0].result.inDesiredState | Should -BeTrue
29-
}
30-
else {
31-
$out.results[0].result.inDesiredState | Should -BeFalse
32-
$out.results[0].result.differingProperties | Should -Contain 'resources'
28+
} else {
29+
$LASTEXITCODE | Should -Be 2
30+
$log = Get-Content "$TestDrive/trace.log" -Raw
31+
$log | Should -Match '.*Assertion failed.*'
3332
}
3433
}
3534

0 commit comments

Comments
 (0)