Skip to content

Commit edbe54b

Browse files
author
Andrew
committed
test update 1
1 parent d62e4f4 commit edbe54b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dsc/tests/dsc.exit_code.tests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
Describe 'exit code tests' {
55
It 'non-zero exit code in manifest has corresponding message' {
6-
$result = dsc resource get -r Test/ExitCode --input "{ exitCode: 8 }" 2>&1
7-
$result | Should -Match 'ERROR.*?[Exit code 8].*?manifest description: Placeholder from manifest for exit code 8'
6+
dsc resource get -r Test/ExitCode --input "{ exitCode: 8 }" 2> $TestDrive/tracing.txt
7+
"$TestDrive/tracing.txt" | Should -FileContentMatchExactly 'Placeholder from manifest for exit code 8'
88
}
99
It 'non-zero exit code not in manifest has generic message' {
10-
$result = dsc resource get -r Test/ExitCode --input "{ exitCode: 1 }" 2>&1
11-
$result | Should -Match 'ERROR.*?Error.*?[Exit code 1]'
10+
dsc resource get -r Test/ExitCode --input "{ exitCode: 1 }" 2> $TestDrive/tracing.txt
11+
"$TestDrive/tracing.txt" | Should -FileContentMatchExactly 'Exit code 1'
1212
}
1313
It 'success exit code executes without error' {
1414
$result = dsc resource get -r Test/ExitCode --input "{ exitCode: 0 }" | ConvertFrom-Json

0 commit comments

Comments
 (0)