File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ resources:
271
271
$out | Should - BeLike " *ERROR*Credential object 'Credential' requires both 'username' and 'password' properties*"
272
272
}
273
273
274
- It ' List works with class-based DSC resources' - Skip:(! $IsWindows ) {
274
+ It ' List works with class-based PS DSC resources' - Skip:(! $IsWindows ) {
275
275
BeforeDiscovery {
276
276
$windowsPowerShellPath = Join-Path $env: SystemRoot ' System32' ' WindowsPowerShell' ' v1.0' ' Modules'
277
277
@@ -337,9 +337,17 @@ class PSClassResource {
337
337
$resources.type | Should - Contain ' PSClassResource/PSClassResource'
338
338
}
339
339
340
- It ' Get works with class-based DSC resources' - Skip:(! $IsWindows ) {
340
+ It ' Get works with class-based PS DSC resources' - Skip:(! $IsWindows ) {
341
341
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
343
343
$LASTEXITCODE | Should - Be 0
344
344
$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
+ }
You can’t perform that action at this time.
0 commit comments