Skip to content

Commit 1070169

Browse files
authored
Merge pull request #1458 from SteveL-MSFT/discovery-test-fix
Fix discovery tests due to trace change
2 parents 1ee1022 + 6d1f610 commit 1070169

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dsc/tests/dsc_discovery.tests.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Describe 'tests for resource discovery' {
8484
$resources.Count | Should -Be 0
8585
}
8686

87-
It 'warns on invalid semver' {
87+
It 'info on invalid semver' {
8888
$manifest = @'
8989
{
9090
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
@@ -101,8 +101,10 @@ Describe 'tests for resource discovery' {
101101
}
102102
'@
103103
Set-Content -Path "$testdrive/test.dsc.resource.json" -Value $manifest
104-
$null = dsc resource list 2> "$testdrive/error.txt"
105-
"$testdrive/error.txt" | Should -FileContentMatchExactly 'WARN.*?invalid semantic version' -Because (Get-Content -Raw "$testdrive/error.txt")
104+
$null = dsc -l info resource list 2> "$testdrive/error.txt"
105+
$LASTEXITCODE | Should -Be 0
106+
$errorTxt = Get-Content -Raw "$testdrive/error.txt"
107+
$errorTxt | Should -Match 'INFO.*?invalid semantic version' -Because $errorTxt
106108
}
107109
}
108110

0 commit comments

Comments
 (0)