Skip to content

Commit 2758de2

Browse files
committed
Enable ModuleDependencyHandler.tests.ps1 Pester tests on Linux (I expect up to 7 test failures here) whilst also making the tests a bit x-plat compliant (TDD)
1 parent c34ff8f commit 2758de2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tests/Engine/ModuleDependencyHandler.tests.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $directory = Split-Path -Parent $MyInvocation.MyCommand.Path
33
Describe "Resolve DSC Resource Dependency" {
44
BeforeAll {
55
$skipTest = $false
6-
if ($IsLinux -or $IsMacOS -or $testingLibararyUsage -or ($PSversionTable.PSVersion -lt [Version]'5.0.0'))
6+
if ($IsMacOS -or $testingLibararyUsage -or ($PSversionTable.PSVersion -lt [Version]'5.0.0'))
77
{
88
$skipTest = $true
99
return
@@ -46,6 +46,9 @@ Describe "Resolve DSC Resource Dependency" {
4646
$depHandler.TempPath | Should -Be $expectedPath
4747

4848
$expectedLocalAppDataPath = $env:LOCALAPPDATA
49+
if ($IsLinux -or $IsMacOS) {
50+
$expectedLocalAppDataPath = $env:HOME
51+
}
4952
$depHandler.LocalAppDataPath | Should -Be $expectedLocalAppDataPath
5053

5154
$expectedModuleRepository = "PSGallery"

0 commit comments

Comments
 (0)