Skip to content

Commit 65a1d80

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
update test to preserve DSC_RESOURCE_PATH if set
1 parent 2bcb0fc commit 65a1d80

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dsc/tests/dsc_resource_list.tests.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ Describe 'Tests for listing resources' {
148148
Set-Content -Path $manifestPath -Value $resource_manifest
149149
Set-Content -Path $manifestDupePath -Value $resource_manifest
150150

151+
$oldPath = $env:DSC_RESOURCE_PATH
151152
try {
152153
$env:DSC_RESOURCE_PATH = $TestDrive + [System.IO.Path]::PathSeparator + $env:PATH
153154
$resources = dsc resource list | ConvertFrom-Json
@@ -157,7 +158,7 @@ Describe 'Tests for listing resources' {
157158
$group.Count | Should -Be 1 -Because ($resources | ConvertTo-Json -Depth 20)
158159
}
159160
} finally {
160-
$env:DSC_RESOURCE_PATH = $null
161+
$env:DSC_RESOURCE_PATH = $oldPath
161162
}
162163
}
163164
}

0 commit comments

Comments
 (0)