File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ Describe 'WindowsPowerShell adapter resource tests - requires elevated permissio
20
20
21
21
# Remove after all the tests are done
22
22
Remove-Module $script :winPSModule - Force - ErrorAction Ignore
23
+
24
+ Remove-Item - Path (Join-Path $env: SystemRoot ' System32' ' WindowsPowerShell' ' v1.0' ' Modules' ' PSClassResource' ) - Force - Recurse - ErrorAction Ignore
23
25
}
24
26
25
27
BeforeEach {
@@ -331,6 +333,13 @@ class PSClassResource {
331
333
}
332
334
333
335
$resources = dsc - l trace resource list -- adapter Microsoft.Windows/ WindowsPowerShell | ConvertFrom-Json
336
+ $LASTEXITCODE | Should - Be 0
334
337
$resources.type | Should - Contain ' PSClassResource/PSClassResource'
335
338
}
336
- }
339
+
340
+ It ' Get works with class-based DSC resources' - Skip:(! $IsWindows ) {
341
+
342
+ $out = dsc resource get - r PSClassResource/ PSClassResource -- input (@ {Name = ' TestName' } | ConvertTo-Json ) | ConvertFrom-Json
343
+ $LASTEXITCODE | Should - Be 0
344
+ $out.actualState.Name | Should - Be ' TestName'
345
+ }
You can’t perform that action at this time.
0 commit comments