diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Clipboard.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Clipboard.Tests.ps1 index 52f9e3317c6..d28394c9f26 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Clipboard.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Clipboard.Tests.ps1 @@ -13,7 +13,7 @@ Describe 'Clipboard cmdlet tests' -Tag CI { } AfterAll { - $PSDefaultParameterValues = $defaultParamValues + $global:PSDefaultParameterValues = $defaultParamValues } It 'Get-Clipboard returns what is in Set-Clipboard' { diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/FileSystemProviderExtended.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/FileSystemProviderExtended.Tests.ps1 index cdab0264fe7..e9c490d5392 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/FileSystemProviderExtended.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/FileSystemProviderExtended.Tests.ps1 @@ -1,8 +1,13 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. -Describe "Extended FileSystem Provider Tests for Get-ChildItem cmdlet" -Tags "CI" { +Describe "FileSystem Provider Extended Tests for Get-ChildItem cmdlet" -Tags "CI" { BeforeAll { + $originalDefaultParameterValues = $PSDefaultParameterValues.Clone() + if ($IsLinux) { + $PSDefaultParameterValues["it:skip"] = $true + } + $restoreLocation = Get-Location $DirSep = [IO.Path]::DirectorySeparatorChar @@ -36,6 +41,8 @@ Describe "Extended FileSystem Provider Tests for Get-ChildItem cmdlet" -Tags "CI } AfterAll { + $global:PSDefaultParameterValues = $originalDefaultParameterValues + #restore the previous location Set-Location -Path $restoreLocation } diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-Process.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-Process.Tests.ps1 index ef6fd1dbe5d..6143ddca0be 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-Process.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-Process.Tests.ps1 @@ -70,7 +70,8 @@ Describe "Get-Process" -Tags "CI" { { (Get-Process -Id $idleProcessPid).Name } | Should -Not -Throw } - It "Test for process property = Name" { + It "Test for process property = Name" -Pending { + # Bug in .Net 5.0 Preview4. See https://github.com/PowerShell/PowerShell/pull/12894 (Get-Process -Id $PID).Name | Should -BeExactly "pwsh" } @@ -123,12 +124,14 @@ Describe "Get-Process Formatting" -Tags "Feature" { } Describe "Process Parent property" -Tags "CI" { - It "Has Parent process property" { + It "Has Parent process property" -Pending { + # Bug in .Net 5.0 Preview4. See https://github.com/PowerShell/PowerShell/pull/12894 $powershellexe = (Get-Process -Id $PID).mainmodule.filename & $powershellexe -noprofile -command '(Get-Process -Id $PID).Parent' | Should -Not -BeNullOrEmpty } - It "Has valid parent process ID property" { + It "Has valid parent process ID property" -Pending { + # Bug. See https://github.com/PowerShell/PowerShell/issues/12908 $powershellexe = (Get-Process -Id $PID).mainmodule.filename & $powershellexe -noprofile -command '(Get-Process -Id $PID).Parent.Id' | Should -Be $PID }