Skip to content

Commit fbb74e2

Browse files
committed
Add tracing to test that failed in CI
1 parent febb12d commit fbb74e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dsc/tests/dsc_tracing.tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ Describe 'tracing tests' {
8282
level: trace
8383
"@
8484

85-
$out = (dsc -l $level config get -i $configYaml 2> $null) | ConvertFrom-Json
85+
$out = (dsc -l $level config get -i $configYaml 2> $TestDrive/error.log) | ConvertFrom-Json
86+
$LASTEXITCODE | Should -Be 0 -Because (Get-Content -Path $TestDrive/error.log | Out-String)
8687
$out.results[0].result.actualState.level | Should -BeExactly $level -Because ($out | Out-String)
8788
}
8889

@@ -91,7 +92,6 @@ Describe 'tracing tests' {
9192
$out = dsc -l info -t pass-through config get -f ../examples/groups.dsc.yaml 2> $logPath
9293
foreach ($line in (Get-Content $logPath)) {
9394
$line | Should -Not -BeNullOrEmpty
94-
Write-Verbose -Verbose $line
9595
$json = $line | ConvertFrom-Json
9696
$json.timestamp | Should -Not -BeNullOrEmpty
9797
$json.level | Should -BeIn 'ERROR', 'WARN', 'INFO', 'DEBUG', 'TRACE'

0 commit comments

Comments
 (0)