Add more logging to PD node delete test

This commit is contained in:
saadali 2017-07-19 08:32:46 -07:00
parent 575cbdf7d4
commit 4804e320e4

View File

@ -450,16 +450,16 @@ var _ = SIGDescribe("Pod Disks", func() {
framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, true /* should exist*/))
output, err := exec.Command("gcloud", "compute", "instances", "list").CombinedOutput()
framework.ExpectNoError(err, fmt.Sprintf("Unable to get list of node instances %v", err))
framework.ExpectNoError(err, fmt.Sprintf("Unable to get list of node instances err=%v output=%s", err, output))
Expect(true, strings.Contains(string(output), string(host0Name)))
By("deleting host0")
output, err = exec.Command("gcloud", "compute", "instances", "delete", string(host0Name), "--project="+framework.TestContext.CloudConfig.ProjectID, "--zone="+framework.TestContext.CloudConfig.Zone).CombinedOutput()
framework.ExpectNoError(err, fmt.Sprintf("Failed to delete host0pod: %v", err))
framework.ExpectNoError(err, fmt.Sprintf("Failed to delete host0pod: err=%v output=%s", err, output))
output, err = exec.Command("gcloud", "compute", "instances", "list").CombinedOutput()
framework.ExpectNoError(err, fmt.Sprintf("Unable to get list of node instances %v", err))
framework.ExpectNoError(err, fmt.Sprintf("Unable to get list of node instances err=%v output=%s", err, output))
Expect(false, strings.Contains(string(output), string(host0Name)))
// The disk should be detached from host0 on it's deletion