From d7c02288fc76a946d94c7e4b04d5b77a3c17b2be Mon Sep 17 00:00:00 2001 From: Divyen Patel Date: Wed, 14 Feb 2018 07:03:43 -0800 Subject: [PATCH] fixing diskIsAttached func --- test/e2e/storage/vsphere/vsphere_utils.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/e2e/storage/vsphere/vsphere_utils.go b/test/e2e/storage/vsphere/vsphere_utils.go index 8f0e81af29e..8cea902ca51 100644 --- a/test/e2e/storage/vsphere/vsphere_utils.go +++ b/test/e2e/storage/vsphere/vsphere_utils.go @@ -719,11 +719,10 @@ func diskIsAttached(volPath string, nodeName string) (bool, error) { nodeName) return false, err } - if device != nil { - framework.Logf("diskIsAttached found the disk %q attached on node %q", - volPath, - nodeName) + if device == nil { + return false, nil } + framework.Logf("diskIsAttached found the disk %q attached on node %q", volPath, nodeName) return true, nil }