File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3
3
4
4
Describe ' exit code tests' {
5
5
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'
8
8
}
9
9
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'
12
12
}
13
13
It ' success exit code executes without error' {
14
14
$result = dsc resource get - r Test/ ExitCode -- input " { exitCode: 0 }" | ConvertFrom-Json
You can’t perform that action at this time.
0 commit comments