From a0861aeb52b52d9243e551b4277fda8a79303aa9 Mon Sep 17 00:00:00 2001 From: Caleb Woodbine Date: Wed, 22 Jul 2020 15:23:56 +1200 Subject: [PATCH] Fix fmt and staticcheck --- test/e2e/common/pods.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/e2e/common/pods.go b/test/e2e/common/pods.go index 5f81de37f56..5e7c681e4f9 100644 --- a/test/e2e/common/pods.go +++ b/test/e2e/common/pods.go @@ -910,18 +910,19 @@ var _ = framework.KubeDescribe("Pods", func() { } ginkgo.By("creating a Pod with a static label") _, err = f.ClientSet.CoreV1().Pods(testNamespaceName).Create(context.TODO(), &testPod, metav1.CreateOptions{}) + framework.ExpectNoError(err, "failed to create Pod %v in namespace %v", testPod.ObjectMeta.Name, testNamespaceName) ginkgo.By("watching for Pod to be ready") ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() _, err = watchtools.Until(ctx, podsList.ResourceVersion, w, func(event watch.Event) (bool, error) { - if pod, ok := event.Object.(*v1.Pod); ok { - found := pod.ObjectMeta.Name == testPod.ObjectMeta.Name && - pod.ObjectMeta.Namespace == testNamespaceName && - pod.Labels["test-pod-static"] == "true" && - pod.Status.Phase == v1.PodRunning - return found, nil - } + if pod, ok := event.Object.(*v1.Pod); ok { + found := pod.ObjectMeta.Name == testPod.ObjectMeta.Name && + pod.ObjectMeta.Namespace == testNamespaceName && + pod.Labels["test-pod-static"] == "true" && + pod.Status.Phase == v1.PodRunning + return found, nil + } return false, nil }) framework.ExpectNoError(err, "failed to see Pod %v in namespace %v running", testPod.ObjectMeta.Name, testNamespaceName)