Skip to content

Commit 80b4ad5

Browse files
committed
Fix path in test
1 parent ca2473d commit 80b4ad5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dsc/tests/dsc_extension_discover.tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Describe 'Discover extension tests' {
55
BeforeAll {
66
$oldPath = $env:PATH
77
$toolPath = Resolve-Path -Path "$PSScriptRoot/../../extensions/test/discover"
8-
$env:PATH = $toolPath + [System.IO.Path]::PathSeparator + $oldPath
8+
$env:PATH = "$toolPath" + [System.IO.Path]::PathSeparator + $oldPath
99
}
1010

1111
AfterAll {
@@ -74,10 +74,10 @@ Describe 'Discover extension tests' {
7474
Set-Content -Path "$TestDrive/test.dsc.extension.json" -Value $extension_json
7575
Copy-Item -Path "$toolPath/discover.ps1" -Destination $TestDrive | Out-Null
7676
Copy-Item -Path "$toolPath/resources" -Destination $TestDrive -Recurse | Out-Null
77-
$env:DSC_RESOURCE_PATH = "$TestDrive$separator$oldPath"
77+
$env:DSC_RESOURCE_PATH = "$TestDrive" + [System.IO.Path]::PathSeparator + (Split-Path (Get-Command pwsh).Source -Parent)
7878
try {
7979
$out = dsc extension list | ConvertFrom-Json
80-
$out.Count | Should -Be 1
80+
$out.Count | Should -Be 1 -Because ($out | Out-String)
8181
$out.type | Should -Be 'Test/DiscoverRelative'
8282
$out = dsc resource list 2> $TestDrive/error.log
8383
write-verbose -verbose (Get-Content -Path "$TestDrive/error.log" -Raw)

0 commit comments

Comments
 (0)