Merge pull request #92497 from oomichi/vsphere

nit: Fix invokeStaleDummyVMTestWithStoragePolicy()
This commit is contained in:
Kubernetes Prow Robot 2020-06-26 00:08:04 -07:00 committed by GitHub
commit 5ff5dbb07c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -335,8 +335,9 @@ func invokeStaleDummyVMTestWithStoragePolicy(client clientset.Interface, masterN
fnvHash := fnv.New32a()
fnvHash.Write([]byte(vmName))
dummyVMFullName := dummyVMPrefixName + "-" + fmt.Sprint(fnvHash.Sum32())
errorMsg := "Dummy VM - " + vmName + "is still present. Failing the test.."
errorMsg := "Dummy VM - " + vmName + " is still present. Failing the test.."
nodeInfo := TestContext.NodeMapper.GetNodeInfo(masterNode)
isVMPresentFlag, _ := nodeInfo.VSphere.IsVMPresent(dummyVMFullName, nodeInfo.DataCenterRef)
framework.ExpectNotEqual(isVMPresentFlag, true, errorMsg)
isVMPresentFlag, err := nodeInfo.VSphere.IsVMPresent(dummyVMFullName, nodeInfo.DataCenterRef)
framework.ExpectNoError(err)
framework.ExpectEqual(isVMPresentFlag, false, errorMsg)
}