mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #126980 from dims/fix-for-GenericPersistentVolume-disruptive-test-failures
Fix for GenericPersistentVolume/Disruptive test failures
This commit is contained in:
commit
eebc897e4f
@ -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{})
|
pvc, err = c.CoreV1().PersistentVolumeClaims(pvc.Namespace).Create(ctx, pvc, metav1.CreateOptions{})
|
||||||
framework.ExpectNoError(err, "Error creating pvc")
|
framework.ExpectNoError(err, "Error creating pvc")
|
||||||
pvcClaims := []*v1.PersistentVolumeClaim{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")
|
ginkgo.By("Creating a pod with dynamically provisioned volume")
|
||||||
podConfig := e2epod.Config{
|
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)
|
pod, err := e2epod.CreateSecPod(ctx, c, &podConfig, f.Timeouts.PodStart)
|
||||||
framework.ExpectNoError(err, "While creating pods for kubelet restart test")
|
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]
|
return pod, pvc, pvs[0]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user