Skip to content

Commit f7460ec

Browse files
author
Andrew
committed
Fixed regression in Test operation
1 parent b6c6983 commit f7460ec

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

powershell-adapter/Tests/powershellgroup.resource.tests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Describe 'PowerShell adapter resource tests' {
5858
$LASTEXITCODE | Should -Be 0
5959
$res = $r | ConvertFrom-Json
6060
$res.actualState.result.properties.InDesiredState | Should -Be $True
61+
$res.actualState.result.properties.InDesiredState.GetType().Name | Should -Be "Boolean"
6162

6263
# verify that only properties with DscProperty attribute are returned
6364
$propertiesNames = $res.actualState.result.properties.InDesiredState | Get-Member -MemberType NoteProperty | % Name

powershell-adapter/psDscAdapter/psDscAdapter.psm1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,7 @@ function Invoke-DscOperation {
480480
$dscResourceInstance.Set()
481481
}
482482
'Test' {
483-
$Result = @{}
484-
$raw_obj = $dscResourceInstance.Test()
485-
$ValidProperties | ForEach-Object { $Result[$_] = $raw_obj.$_ }
483+
$Result = $dscResourceInstance.Test()
486484
$addToActualState.properties = [psobject]@{'InDesiredState'=$Result}
487485
}
488486
'Export' {

0 commit comments

Comments
 (0)