@@ -109,9 +109,6 @@ func createPodPVCFromSC(ctx context.Context, f *framework.Framework, c clientset
109
109
pvc , err = c .CoreV1 ().PersistentVolumeClaims (pvc .Namespace ).Create (ctx , pvc , metav1.CreateOptions {})
110
110
framework .ExpectNoError (err , "Error creating pvc" )
111
111
pvcClaims := []* v1.PersistentVolumeClaim {pvc }
112
- pvs , err := e2epv .WaitForPVClaimBoundPhase (ctx , c , pvcClaims , framework .ClaimProvisionTimeout )
113
- framework .ExpectNoError (err , "Failed waiting for PVC to be bound %v" , err )
114
- gomega .Expect (pvs ).To (gomega .HaveLen (1 ))
115
112
116
113
ginkgo .By ("Creating a pod with dynamically provisioned volume" )
117
114
podConfig := e2epod.Config {
@@ -121,5 +118,11 @@ func createPodPVCFromSC(ctx context.Context, f *framework.Framework, c clientset
121
118
}
122
119
pod , err := e2epod .CreateSecPod (ctx , c , & podConfig , f .Timeouts .PodStart )
123
120
framework .ExpectNoError (err , "While creating pods for kubelet restart test" )
121
+
122
+ ginkgo .By ("Checking for bound PVC" )
123
+ pvs , err := e2epv .WaitForPVClaimBoundPhase (ctx , c , pvcClaims , framework .ClaimProvisionTimeout )
124
+ framework .ExpectNoError (err , "Failed waiting for PVC to be bound %v" , err )
125
+ gomega .Expect (pvs ).To (gomega .HaveLen (1 ))
126
+
124
127
return pod , pvc , pvs [0 ]
125
128
}
0 commit comments