mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add a test for get-runspace -name and remove the runspace close from AfterAll block
This commit is contained in:
@@ -12,6 +12,10 @@ Describe "Get-Runspace cmdlet tests" -Tag "CI" {
|
||||
$runspace = get-runspace -instanceid $CurrentRunspace.InstanceId
|
||||
$runspace.InstanceId | Should be $ExpectedInstanceId
|
||||
}
|
||||
It "Get-Runspace with runspace name should return the correct runspace" {
|
||||
$runspace = get-runspace -name $currentRunspace.Name
|
||||
$runspace.InstanceId | Should be $ExpectedInstanceId
|
||||
}
|
||||
It "Get-Runspace with runspace Id should return the correct runspace" {
|
||||
$runspace = get-runspace -id $CurrentRunspace.Id
|
||||
$runspace.InstanceId | Should be $ExpectedInstanceId
|
||||
@@ -24,7 +28,6 @@ Describe "Get-Runspace cmdlet tests" -Tag "CI" {
|
||||
$r2 = [runspacefactory]::CreateRunspace()
|
||||
}
|
||||
AfterAll {
|
||||
$r1.Close()
|
||||
$r1.Dispose()
|
||||
$r2.Dispose()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user