Skip to content

Commit

Permalink
update powershell test
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveL-MSFT committed Mar 8, 2024
1 parent cd4b7d7 commit 80371db
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions powershell-adapter/Tests/powershellgroup.config.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Describe 'PowerShell adapter resource tests' {
$res.results[0].result.actualState.Prop1 | Should -Be $TestDrive
}

It 'DSCConfigRoot macro is empty when config is piped from stdin' -Skip:(!$IsWindows){
It 'DSC_CONFIG_ROOT env var does not exist when config is piped from stdin' -Skip:(!$IsWindows){

$yaml = @"
`$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
Expand All @@ -134,10 +134,7 @@ Describe 'PowerShell adapter resource tests' {
properties:
Name: "[envvar('DSC_CONFIG_ROOT')]"
"@
$out = $yaml | dsc config get
$LASTEXITCODE | Should -Be 0
$res = $out | ConvertFrom-Json
$res.results[0].result.actualState.Name | Should -Be ""
$res.results[0].result.actualState.Prop1 | Should -Be ""
$null = $yaml | dsc config get
$LASTEXITCODE | Should -Be 2
}
}

0 comments on commit 80371db

Please sign in to comment.