mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Fix for GenericPersistentVolume/Disruptive test failures
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
e74205b08a
commit
8dc84eda9d
@ -109,9 +109,6 @@ func createPodPVCFromSC(ctx context.Context, f *framework.Framework, c clientset
|
||||
pvc, err = c.CoreV1().PersistentVolumeClaims(pvc.Namespace).Create(ctx, pvc, metav1.CreateOptions{})
|
||||
framework.ExpectNoError(err, "Error creating pvc")
|
||||
pvcClaims := []*v1.PersistentVolumeClaim{pvc}
|
||||
pvs, err := e2epv.WaitForPVClaimBoundPhase(ctx, c, pvcClaims, framework.ClaimProvisionTimeout)
|
||||
framework.ExpectNoError(err, "Failed waiting for PVC to be bound %v", err)
|
||||
gomega.Expect(pvs).To(gomega.HaveLen(1))
|
||||
|
||||
ginkgo.By("Creating a pod with dynamically provisioned volume")
|
||||
podConfig := e2epod.Config{
|
||||
@ -121,5 +118,11 @@ func createPodPVCFromSC(ctx context.Context, f *framework.Framework, c clientset
|
||||
}
|
||||
pod, err := e2epod.CreateSecPod(ctx, c, &podConfig, f.Timeouts.PodStart)
|
||||
framework.ExpectNoError(err, "While creating pods for kubelet restart test")
|
||||
|
||||
ginkgo.By("Checking for bound PVC")
|
||||
pvs, err := e2epv.WaitForPVClaimBoundPhase(ctx, c, pvcClaims, framework.ClaimProvisionTimeout)
|
||||
framework.ExpectNoError(err, "Failed waiting for PVC to be bound %v", err)
|
||||
gomega.Expect(pvs).To(gomega.HaveLen(1))
|
||||
|
||||
return pod, pvc, pvs[0]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user