@@ -851,7 +851,7 @@ var _ = SIGDescribe("Pods", func() {
851
851
ginkgo .By ("Create set of pods" )
852
852
// create a set of pods in test namespace
853
853
for _ , podTestName := range podTestNames {
854
- _ , err := f . ClientSet . CoreV1 (). Pods ( f . Namespace . Name ) .Create (ctx ,
854
+ _ = podClient .Create (ctx ,
855
855
e2epod .MustMixinRestrictedPodSecurity (& v1.Pod {
856
856
ObjectMeta : metav1.ObjectMeta {
857
857
Name : podTestName ,
@@ -866,8 +866,7 @@ var _ = SIGDescribe("Pods", func() {
866
866
Name : "token-test" ,
867
867
}},
868
868
RestartPolicy : v1 .RestartPolicyNever ,
869
- }}), metav1.CreateOptions {})
870
- framework .ExpectNoError (err , "failed to create pod" )
869
+ }}))
871
870
framework .Logf ("created %v" , podTestName )
872
871
}
873
872
@@ -929,8 +928,7 @@ var _ = SIGDescribe("Pods", func() {
929
928
},
930
929
})
931
930
ginkgo .By ("creating a Pod with a static label" )
932
- _ , err = f .ClientSet .CoreV1 ().Pods (testNamespaceName ).Create (ctx , testPod , metav1.CreateOptions {})
933
- framework .ExpectNoError (err , "failed to create Pod %v in namespace %v" , testPod .ObjectMeta .Name , testNamespaceName )
931
+ _ = podClient .Create (ctx , testPod )
934
932
935
933
ginkgo .By ("watching for Pod to be ready" )
936
934
ctxUntil , cancel := context .WithTimeout (ctx , f .Timeouts .PodStart )
@@ -1082,8 +1080,6 @@ var _ = SIGDescribe("Pods", func() {
1082
1080
the fields MUST equal the new values.
1083
1081
*/
1084
1082
framework .ConformanceIt ("should patch a pod status" , func (ctx context.Context ) {
1085
- ns := f .Namespace .Name
1086
- podClient := f .ClientSet .CoreV1 ().Pods (ns )
1087
1083
podName := "pod-" + utilrand .String (5 )
1088
1084
label := map [string ]string {"e2e" : podName }
1089
1085
@@ -1103,8 +1099,7 @@ var _ = SIGDescribe("Pods", func() {
1103
1099
},
1104
1100
},
1105
1101
})
1106
- pod , err := podClient .Create (ctx , testPod , metav1.CreateOptions {})
1107
- framework .ExpectNoError (err , "failed to create Pod %v in namespace %v" , testPod .ObjectMeta .Name , ns )
1102
+ pod := podClient .Create (ctx , testPod )
1108
1103
framework .ExpectNoError (e2epod .WaitForPodRunningInNamespace (ctx , f .ClientSet , pod ), "Pod didn't start within time out period" )
1109
1104
1110
1105
ginkgo .By ("patching /status" )
0 commit comments