Skip to content

Commit a3dd6be

Browse files
committed
Fix syntax
1 parent d32e6f7 commit a3dd6be

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

powershell-adapter/Tests/win_powershellgroup.tests.ps1

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ resources:
271271
$out | Should -BeLike "*ERROR*Credential object 'Credential' requires both 'username' and 'password' properties*"
272272
}
273273

274-
It 'List works with class-based DSC resources' -Skip:(!$IsWindows) {
274+
It 'List works with class-based PS DSC resources' -Skip:(!$IsWindows) {
275275
BeforeDiscovery {
276276
$windowsPowerShellPath = Join-Path $env:SystemRoot 'System32' 'WindowsPowerShell' 'v1.0' 'Modules'
277277

@@ -337,9 +337,17 @@ class PSClassResource {
337337
$resources.type | Should -Contain 'PSClassResource/PSClassResource'
338338
}
339339

340-
It 'Get works with class-based DSC resources' -Skip:(!$IsWindows) {
340+
It 'Get works with class-based PS DSC resources' -Skip:(!$IsWindows) {
341341

342-
$out = dsc resource get -r PSClassResource/PSClassResource --input (@{Name = 'TestName'} | ConvertTo-Json) | ConvertFrom-Json
342+
$out = dsc resource get -r PSClassResource/PSClassResource --input (@{Name = 'TestName' } | ConvertTo-Json) | ConvertFrom-Json
343343
$LASTEXITCODE | Should -Be 0
344344
$out.actualState.Name | Should -Be 'TestName'
345-
}
345+
}
346+
347+
It 'Set works with class-based PS DSC resources' -Skip:(!$IsWindows) {
348+
349+
$out = dsc resource set -r PSClassResource/PSClassResource --input (@{Name = 'TestName' } | ConvertTo-Json) | ConvertFrom-Json
350+
$LASTEXITCODE | Should -Be 0
351+
$out.afterstate.InDesiredState | Should -Be $true
352+
}
353+
}

0 commit comments

Comments
 (0)