File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Describe 'WindowsPowerShell adapter resource tests - requires elevated permissio
2121 # Remove after all the tests are done
2222 Remove-Module $script :winPSModule - Force - ErrorAction Ignore
2323
24- Remove-Item - Path (Join-Path $env: SystemRoot ' System32 ' ' WindowsPowerShell' ' v1.0 ' ' Modules' ' PSClassResource' ) - Force - Recurse - ErrorAction Ignore
24+ Remove-Item - Path (Join-Path $env: ProgramFiles ' WindowsPowerShell' ' Modules' ' PSClassResource' ) - Force - Recurse - ErrorAction Ignore
2525 }
2626
2727 BeforeEach {
@@ -273,7 +273,7 @@ resources:
273273
274274 It ' List works with class-based PS DSC resources' - Skip:(! $IsWindows ) {
275275 BeforeDiscovery {
276- $windowsPowerShellPath = Join-Path $env: SystemRoot ' System32 ' ' WindowsPowerShell' ' v1.0 ' ' Modules'
276+ $windowsPowerShellPath = Join-Path $env: ProgramFiles ' WindowsPowerShell' ' Modules'
277277
278278 $moduleFile = @"
279279@{
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ function Invoke-DscCacheRefresh {
224224 }
225225
226226 # workaround: Use GetTypeInstanceFromModule to get the type instance from the module and validate if it is a class-based resource
227- $classBased = GetTypeInstanceFromModule - modulename $moduleName - classname $dscResource.Name - ErrorAction SilentlyContinue
227+ $classBased = GetTypeInstanceFromModule - modulename $moduleName - classname $dscResource.Name - ErrorAction Ignore
228228 if (-not ([string ]::IsNullOrEmpty($classBased ))) {
229229 $dscResourceInfo.ImplementationDetail = ' ClassBased'
230230 }
You can’t perform that action at this time.
0 commit comments