Skip to content

Commit a0861ae

Browse files
committed
Fix fmt and staticcheck
1 parent d26cb71 commit a0861ae

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

test/e2e/common/pods.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -910,18 +910,19 @@ var _ = framework.KubeDescribe("Pods", func() {
910910
}
911911
ginkgo.By("creating a Pod with a static label")
912912
_, err = f.ClientSet.CoreV1().Pods(testNamespaceName).Create(context.TODO(), &testPod, metav1.CreateOptions{})
913+
framework.ExpectNoError(err, "failed to create Pod %v in namespace %v", testPod.ObjectMeta.Name, testNamespaceName)
913914

914915
ginkgo.By("watching for Pod to be ready")
915916
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
916917
defer cancel()
917918
_, err = watchtools.Until(ctx, podsList.ResourceVersion, w, func(event watch.Event) (bool, error) {
918-
if pod, ok := event.Object.(*v1.Pod); ok {
919-
found := pod.ObjectMeta.Name == testPod.ObjectMeta.Name &&
920-
pod.ObjectMeta.Namespace == testNamespaceName &&
921-
pod.Labels["test-pod-static"] == "true" &&
922-
pod.Status.Phase == v1.PodRunning
923-
return found, nil
924-
}
919+
if pod, ok := event.Object.(*v1.Pod); ok {
920+
found := pod.ObjectMeta.Name == testPod.ObjectMeta.Name &&
921+
pod.ObjectMeta.Namespace == testNamespaceName &&
922+
pod.Labels["test-pod-static"] == "true" &&
923+
pod.Status.Phase == v1.PodRunning
924+
return found, nil
925+
}
925926
return false, nil
926927
})
927928
framework.ExpectNoError(err, "failed to see Pod %v in namespace %v running", testPod.ObjectMeta.Name, testNamespaceName)

0 commit comments

Comments
 (0)