Skip to content

Commit c157972

Browse files
committed
add tracing to tests
1 parent 721ea46 commit c157972

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dsc/tests/dsc_resource_condition.tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ Describe 'Resource condition tests' {
2727
) {
2828
param($operation, $property)
2929
$out = dsc config $operation -i $configYaml 2>$TestDrive/error.log | ConvertFrom-Json
30-
$LASTEXITCODE | Should -Be 0
30+
$LASTEXITCODE | Should -Be 0 -Because (Get-Content $TestDrive/error.log -Raw | Out-String)
3131
$out.results.count | Should -Be 1
3232
$out.results[0].result.$property.Output | Should -BeExactly "This should be executed"
3333
}
3434

3535
It 'resource should be skipped for export' {
3636
$out = dsc config export -i $configYaml 2>$TestDrive/error.log | ConvertFrom-Json
37-
$LASTEXITCODE | Should -Be 0
37+
$LASTEXITCODE | Should -Be 0 -Because (Get-Content $TestDrive/error.log -Raw | Out-String)
3838
$out.resources.count | Should -Be 1
3939
$out.resources[0].type | Should -BeExactly 'Microsoft.DSC.Debug/Echo'
4040
$out.resources[0].properties.output | Should -BeExactly "This should be executed"

0 commit comments

Comments
 (0)