File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -164,17 +164,15 @@ resources:
164164 - "[resourceId('Microsoft.Windows/WindowsPowerShell', 'File')]"
165165 - "[resourceId('Microsoft.DSC/Assertion', 'File present')]"
166166"@
167- # outputting to file because dsc doesn't handle the yaml string correctly when dependsOn is used
167+ # output to file for Windows PowerShell 5.1
168168 $filePath = " $testdrive \test.assertion.dsc.resource.yaml"
169169 $yaml | Set-Content - Path $filePath - Force
170170 dsc config test -f $filePath 2> " $TestDrive /error.txt"
171171 $LASTEXITCODE | Should - Be 1
172172
173- $cache = Get-Content - Raw - Path $cacheFilePath
174- $cache.ResourceCache | Should - Contain @ (' PSTestModule/TestPSRepository' , ' PSDesiredStateConfiguration/File' )
175-
176- # Clean up the test module directory
177- Remove-Item - Path " $testModuleDir " - Recurse - Force - ErrorAction Ignore
173+ $cache = Get-Content - Path $cacheFilePath - Raw | ConvertFrom-Json
174+ $cache.ResourceCache.Type | Should - Contain ' PSTestModule/TestPSRepository'
175+ $cache.ResourceCache.Type | Should - Contain ' PSDesiredStateConfiguration/File'
178176 }
179177
180178 It ' _inDesiredState is returned correction: <Context>' - Skip:(! $IsWindows ) - TestCases @ (
You can’t perform that action at this time.
0 commit comments