Skip to content

Commit 78fbba1

Browse files
author
Andrew
committed
Updated tests for WinPS 2
1 parent 11cd173 commit 78fbba1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

powershell-adapter/Tests/powershellgroup.config.tests.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ Describe 'PowerShell adapter resource tests' {
1212
$pwshConfigPath = Join-path $PSScriptRoot "class_ps_resources.dsc.yaml"
1313
$winpsConfigPath = Join-path $PSScriptRoot "winps_resource.dsc.yaml"
1414

15-
$cacheFilePath = Join-Path $env:LocalAppData "dscv3classcache.json"
1615
if ($IsLinux -or $IsMacOS) {
1716
$cacheFilePath = Join-Path $env:HOME ".dsc" "dscv3classcache.json"
18-
}
17+
}
18+
else
19+
{
20+
$cacheFilePath = Join-Path $env:LocalAppData "dscv3classcache.json"
21+
}
1922
$cacheFilePath_v5 = Join-Path $env:LocalAppData "dscv3classcache-v5.json"
2023
}
2124
AfterAll {

powershell-adapter/Tests/powershellgroup.resource.tests.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ Describe 'PowerShell adapter resource tests' {
1010
$OldPSModulePath = $env:PSModulePath
1111
$env:PSModulePath += [System.IO.Path]::PathSeparator + $PSScriptRoot
1212

13-
$cacheFilePath = Join-Path $env:LocalAppData "dscv3classcache.json"
1413
if ($IsLinux -or $IsMacOS) {
1514
$cacheFilePath = Join-Path $env:HOME ".dsc" "dscv3classcache.json"
16-
}
15+
}
16+
else
17+
{
18+
$cacheFilePath = Join-Path $env:LocalAppData "dscv3classcache.json"
19+
}
1720
$cacheFilePath_v5 = Join-Path $env:LocalAppData "dscv3classcache-v5.json"
1821
}
1922
AfterAll {

0 commit comments

Comments
 (0)