mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Fix test failures on Windows for time zone and remoting (#19466)
This commit is contained in:
1 parent
543b20b4ed
commit
cf6fc53c9f
12 files changed
+199
-140
No files matched your search
@@ -7,7 +7,15 @@ Describe "WinRM based remoting session abrupt disconnect" -Tags 'Feature','Requi
|
||||
|
||||
BeforeAll {
|
||||
$originalDefaultParameterValues = $PSDefaultParameterValues.Clone()
|
||||
if (! $IsWindows -or (Test-IsWinWow64))
|
||||
$pendingTest = (Test-IsWinWow64)
|
||||
$skipTest = !$IsWindows
|
||||
|
||||
if ($pendingTest)
|
||||
{
|
||||
$PSDefaultParameterValues["it:pending"] = $true
|
||||
return
|
||||
}
|
||||
elseif ($skipTest)
|
||||
{
|
||||
$PSDefaultParameterValues["it:skip"] = $true
|
||||
return
|
||||
@@ -56,6 +64,11 @@ Describe "WinRM based remoting session abrupt disconnect" -Tags 'Feature','Requi
|
||||
AfterAll {
|
||||
$global:PSDefaultParameterValues = $originalDefaultParameterValues
|
||||
|
||||
if ($pendingTest -or $skipTest)
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
if ($ps -ne $null) { $ps.Dispose() }
|
||||
if ($session -ne $null) { Remove-PSSession -Session $session }
|
||||
if ($script:job -ne $null) { Remove-Job -Job $script:job -Force }
|
||||
|
||||
Reference in new issue
Block a user