Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit ec6adc5

Browse files
author
Konstantina Chremmou
committed
CA-340473: Synchronous object removers do not return an object.
Signed-off-by: Konstantina Chremmou <[email protected]>
1 parent 6fc5817 commit ec6adc5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

powershell/autogen/samples/AutomatedTestCore.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function disconnect_server([String]$svr) {
175175
# VM Functions
176176

177177
function destroy_vm([XenAPI.VM]$vm) {
178-
if ($vm -eq $null) {
178+
if ($null -eq $vm) {
179179
return
180180
}
181181

@@ -343,9 +343,9 @@ function detach_nfs_sr([String]$sr_name) {
343343
}
344344
}
345345

346-
$sr_opq = Remove-XenSR -Name $sr_name -Async -PassThru | Wait-XenTask -ShowProgress -PassThru
346+
Remove-XenSR -Name $sr_name -Async -PassThru | Wait-XenTask -ShowProgress
347347

348-
if ($null -eq $sr_opq) {
348+
if ($null -eq (Get-XenSR -Name $sr_name)) {
349349
return $true
350350
}
351351
return $false

0 commit comments

Comments
 (0)