File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -19,19 +19,22 @@ Describe 'Tests for osinfo examples' {
19
19
$out.results [0 ].result.inDesiredState | Should - Be $IsMacOS
20
20
}
21
21
22
- It ' Verify dsc home directory is added to PATH to find included resources' {
22
+ It ' Verify dsc home directory is added to PATH to find included resources' - Tag z1 {
23
23
$oldPath = $env: PATH
24
+ $oldLocation = Get-Location
24
25
try {
25
- $exe_path = Resolve-Path " $PSScriptRoot /../../bin/debug"
26
- # Remove unwanted elements
26
+ $exe_path = (Get-Command dsc).Path | Split-Path
27
+ $exe_path | Split-Path | Set-Location
28
+ # Remove exe_path from PATH if it is there
27
29
$new_path = ($oldPath.Split ([System.IO.Path ]::PathSeparator) | Where-Object { $_ -ne $exe_path }) -join [System.IO.Path ]::PathSeparator
28
30
$env: PATH = $new_path
29
31
30
- $null = & " $PSScriptRoot /../../bin/debug /dsc" config test - p " $PSScriptRoot /../examples/osinfo_parameters.dsc.yaml"
32
+ $null = & " $exe_path /dsc" config test - p " $PSScriptRoot /../examples/osinfo_parameters.dsc.yaml"
31
33
$LASTEXITCODE | Should - Be 0
32
34
}
33
35
finally {
34
36
$env: PATH = $oldPath
37
+ $oldLocation | Set-Location
35
38
}
36
39
}
37
40
}
You can’t perform that action at this time.
0 commit comments