File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -164,17 +164,15 @@ resources:
164
164
- "[resourceId('Microsoft.Windows/WindowsPowerShell', 'File')]"
165
165
- "[resourceId('Microsoft.DSC/Assertion', 'File present')]"
166
166
"@
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
168
168
$filePath = " $testdrive \test.assertion.dsc.resource.yaml"
169
169
$yaml | Set-Content - Path $filePath - Force
170
170
dsc config test -f $filePath 2> " $TestDrive /error.txt"
171
171
$LASTEXITCODE | Should - Be 1
172
172
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'
178
176
}
179
177
180
178
It ' _inDesiredState is returned correction: <Context>' - Skip:(! $IsWindows ) - TestCases @ (
You can’t perform that action at this time.
0 commit comments