Skip to content

Commit 3576c17

Browse files
committed
enhance test to validate PATH isn't searched
1 parent 0cf2833 commit 3576c17

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dsc/tests/dsc_discovery.tests.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ Describe 'tests for resource discovery' {
243243
$out = dsc resource get -r 'Test/MyEcho' -i '{"output":"Custom"}' 2> "$testdrive/error.txt" | ConvertFrom-Json
244244
$LASTEXITCODE | Should -Be 0
245245
$out.actualState.output | Should -BeExactly 'Custom'
246+
dsc resource get -r 'Microsoft.DSC.Debug/Echo' -i '{"output":"Custom"}' 2> "$testdrive/error.txt" | ConvertFrom-Json
247+
$LASTEXITCODE | Should -Be 7
248+
Get-Content -Raw -Path "$testdrive/error.txt" | Should -Match "ERROR.*?Resource not found"
246249
}
247250
finally {
248251
$env:DSC_RESOURCE_PATH = $oldPath

0 commit comments

Comments
 (0)