Skip to content

Commit 1bdcf36

Browse files
author
Andrew
committed
test update 6
1 parent 79c0a0a commit 1bdcf36

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dsc/tests/dsc_discovery.tests.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,20 @@ Describe 'tests for resource discovery' {
104104
}
105105

106106
It 'Ensure List operation populates adapter lookup table' {
107-
$env:DSC_RESOURCE_PATH = $null
108107
# remove adapter lookup table file
109108
Remove-Item -Force -Path $script:lookupTableFilePath -ErrorAction SilentlyContinue
110109
Test-Path $script:lookupTableFilePath -PathType Leaf | Should -BeFalse
111110

112111
# perform List on an adapter - this should create adapter lookup table file
112+
$oldPSModulePath = $env:PSModulePath
113+
$TestClassResourcePath = Resolve-Path "$PSScriptRoot/../../powershell-adapter/Tests"
114+
$env:DSC_RESOURCE_PATH = $null
115+
$env:PSModulePath += [System.IO.Path]::PathSeparator + $TestClassResourcePath
113116
dsc resource list -a Microsoft.DSC/PowerShell | Out-Null
114117
gc -raw $script:lookupTableFilePath
115118
$script:lookupTableFilePath | Should -FileContentMatchExactly 'Microsoft.DSC/PowerShell'
116119
Test-Path $script:lookupTableFilePath -PathType Leaf | Should -BeTrue
120+
$env:PSModulePath = $oldPSModulePath
117121
}
118122

119123
It 'Ensure non-List operation populates adapter lookup table' {

0 commit comments

Comments
 (0)