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
2020
2121 # Remove after all the tests are done
2222 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
2325 }
2426
2527 BeforeEach {
@@ -331,6 +333,13 @@ class PSClassResource {
331333 }
332334
333335 $resources = dsc - l trace resource list -- adapter Microsoft.Windows/ WindowsPowerShell | ConvertFrom-Json
336+ $LASTEXITCODE | Should - Be 0
334337 $resources.type | Should - Contain ' PSClassResource/PSClassResource'
335338 }
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