From e13fadcb6a7f8d52d508195045f0d82771941d86 Mon Sep 17 00:00:00 2001 From: tanshanshan Date: Mon, 13 Aug 2018 09:48:10 +0800 Subject: [PATCH] Error in return value should be tested and fix Description Info --- test/e2e/storage/vsphere/vsphere_volume_master_restart.go | 4 ++-- test/e2e/storage/vsphere/vsphere_volume_node_poweroff.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/e2e/storage/vsphere/vsphere_volume_master_restart.go b/test/e2e/storage/vsphere/vsphere_volume_master_restart.go index 437930cc855..0f8f714cc4e 100644 --- a/test/e2e/storage/vsphere/vsphere_volume_master_restart.go +++ b/test/e2e/storage/vsphere/vsphere_volume_master_restart.go @@ -102,7 +102,7 @@ var _ = utils.SIGDescribe("Volume Attach Verify [Feature:vsphere][Serial][Disrup pods = append(pods, pod) nodeName := pod.Spec.NodeName - By(fmt.Sprintf("Verify volume %s is attached to the pod %s", volumePath, nodeName)) + By(fmt.Sprintf("Verify volume %s is attached to the node %s", volumePath, nodeName)) expectVolumeToBeAttached(nodeName, volumePath) } @@ -119,7 +119,7 @@ var _ = utils.SIGDescribe("Volume Attach Verify [Feature:vsphere][Serial][Disrup volumePath := volumePaths[i] nodeName := pod.Spec.NodeName - By(fmt.Sprintf("After master restart, verify volume %v is attached to the pod %v", volumePath, nodeName)) + By(fmt.Sprintf("After master restart, verify volume %v is attached to the node %v", volumePath, nodeName)) expectVolumeToBeAttached(nodeName, volumePath) By(fmt.Sprintf("Deleting pod on node %s", nodeName)) diff --git a/test/e2e/storage/vsphere/vsphere_volume_node_poweroff.go b/test/e2e/storage/vsphere/vsphere_volume_node_poweroff.go index 4edd5e3708f..a105d4c765f 100644 --- a/test/e2e/storage/vsphere/vsphere_volume_node_poweroff.go +++ b/test/e2e/storage/vsphere/vsphere_volume_node_poweroff.go @@ -94,10 +94,12 @@ var _ = utils.SIGDescribe("Node Poweroff [Feature:vsphere] [Slow] [Disruptive]", By("Creating a Deployment") deployment, err := framework.CreateDeployment(client, int32(1), map[string]string{"test": "app"}, nil, namespace, pvclaims, "") + Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Failed to create Deployment with err: %v", err)) defer client.ExtensionsV1beta1().Deployments(namespace).Delete(deployment.Name, &metav1.DeleteOptions{}) By("Get pod from the deployement") podList, err := framework.GetPodsForDeployment(client, deployment) + Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Failed to get pod from the deployement with err: %v", err)) Expect(podList.Items).NotTo(BeEmpty()) pod := podList.Items[0] node1 := pod.Spec.NodeName