File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ Describe 'PowerShell adapter resource tests' {
135
135
$res.results.result.actualState.result.properties.Prop1 | Should - Be $TestDrive
136
136
}
137
137
138
- It ' DSC_CONFIG_ROOT env var does not exist when config is piped from stdin' - Skip:(! $IsWindows ){
138
+ It ' DSC_CONFIG_ROOT env var is cwd when config is piped from stdin' - Skip:(! $IsWindows ){
139
139
140
140
$yaml = @"
141
141
`$ schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
@@ -149,8 +149,8 @@ Describe 'PowerShell adapter resource tests' {
149
149
properties:
150
150
Name: "[envvar('DSC_CONFIG_ROOT')]"
151
151
"@
152
- $testError = & { $yaml | dsc config get 2>&1 }
153
- $testError | Select-String ' Environment variable not found ' - Quiet | Should - BeTrue
154
- $LASTEXITCODE | Should - Be 2
152
+ $out = $yaml | dsc config get | ConvertFrom-Json
153
+ $LASTEXITCODE | Should - Be 0
154
+ $out .results [ 0 ].result.actualState.result[ 0 ].properties.Name | Should - BeExactly ( Get-Location ).Path
155
155
}
156
156
}
You can’t perform that action at this time.
0 commit comments