@@ -910,27 +910,9 @@ 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 %s in namespace %s" , testPodName , testNamespaceName )
914
-
915
- ctx , cancel := context .WithTimeout (context .Background (), 30 * time .Second )
916
- defer cancel ()
917
- _ , err = watchtools .Until (ctx , podsList .ResourceVersion , w , func (event watch.Event ) (bool , error ) {
918
- switch event .Type {
919
- case watch .Added :
920
- if pod , ok := event .Object .(* v1.Pod ); ok {
921
- found := pod .ObjectMeta .Name == pod .Name &&
922
- pod .Labels ["test-pod-static" ] == "true"
923
- return found , nil
924
- }
925
- default :
926
- framework .Logf ("observed event type %v" , event .Type )
927
- }
928
- return false , nil
929
- })
930
- framework .ExpectNoError (err , "failed to see %v event" , watch .Added )
931
913
932
914
ginkgo .By ("watching for Pod to be ready" )
933
- ctx , cancel = context .WithTimeout (context .Background (), 30 * time .Second )
915
+ ctx , cancel : = context .WithTimeout (context .Background (), 30 * time .Second )
934
916
defer cancel ()
935
917
_ , err = watchtools .Until (ctx , podsList .ResourceVersion , w , func (event watch.Event ) (bool , error ) {
936
918
if pod , ok := event .Object .(* v1.Pod ); ok {
0 commit comments