File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,16 +316,17 @@ Describe 'tests for resource discovery' {
316316 }
317317'@
318318 Set-Content - Path " $testdrive /test.dsc.resource.json" - Value $invalidManifest
319+ $oldPath = $env: DSC_RESOURCE_PATH
319320 try {
320321 $env: DSC_RESOURCE_PATH = $testdrive + [System.IO.Path ]::PathSeparator + $env: PATH
321322
322323 $out = dsc - l info resource list ' Test/InvalidManifest' 2> " $testdrive /error.txt" | ConvertFrom-Json
323324 $LASTEXITCODE | Should - Be 0
324325 $out | Should - BeNullOrEmpty - Because (Get-Content - Raw - Path " $testdrive /error.txt" )
325326 $errorLog = Get-Content - Raw - Path " $testdrive /error.txt"
326- $errorLog | Should -Match " INFO Failed to load manifest: Manifest: Invalid manifest for resource '. *test.dsc.resource.json'" - Because $errorLog
327+ $errorLog | Should - BeLike " * INFO Failed to load manifest: Manifest: Invalid manifest for resource '*test.dsc.resource.json'* " - Because $errorLog
327328 } finally {
328- $env: DSC_RESOURCE_PATH = $null
329+ $env: DSC_RESOURCE_PATH = $oldPath
329330 }
330331 }
331332}
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ impl ResourceDiscovery for CommandDiscovery {
249249 // resource that is requested by resource/config operation
250250 // if it is, then "ResourceNotFound" error will be issued later
251251 // and here we just write as information
252- info ! ( "{}" , t!( "discovery.commandDiscovery.failedLoadManifest" , err = e) . to_string ( ) ) ;
252+ info ! ( "{}" , t!( "discovery.commandDiscovery.failedLoadManifest" , err = e) ) ;
253253 continue ;
254254 } ,
255255 } ;
You can’t perform that action at this time.
0 commit comments