@@ -910,18 +910,19 @@ var _ = framework.KubeDescribe("Pods", func() {
910
910
}
911
911
ginkgo .By ("creating a Pod with a static label" )
912
912
_ , 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 )
913
914
914
915
ginkgo .By ("watching for Pod to be ready" )
915
916
ctx , cancel := context .WithTimeout (context .Background (), 30 * time .Second )
916
917
defer cancel ()
917
918
_ , 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
+ }
925
926
return false , nil
926
927
})
927
928
framework .ExpectNoError (err , "failed to see Pod %v in namespace %v running" , testPod .ObjectMeta .Name , testNamespaceName )
0 commit comments