Merge pull request #121243 from ii/fix-pv-pvc-status-test

Fix PersistentVolumeStatus & PersistentVolumeClaimStatus e2e test flake
This commit is contained in:
Kubernetes Prow Robot 2023-10-16 19:07:39 +02:00 committed by GitHub
commit e196d24910
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -692,7 +692,7 @@ var _ = utils.SIGDescribe("PersistentVolumes", func() {
retrievedPVC := &v1.PersistentVolumeClaim{}
err = runtime.DefaultUnstructuredConverter.FromUnstructured(pvcUnstructured.UnstructuredContent(), &retrievedPVC)
framework.ExpectNoError(err, "Failed to retrieve %q status.", initialPV.Name)
gomega.Expect(string(retrievedPVC.Status.Phase)).To(gomega.Equal("Pending"), "Checking that the PVC status has been read")
gomega.Expect(string(retrievedPVC.Status.Phase)).To(gomega.Or(gomega.Equal("Pending"), gomega.Equal("Bound")), "Checking that the PVC status has been read")
ginkgo.By(fmt.Sprintf("Reading %q Status", initialPV.Name))
pvResource := schema.GroupVersionResource{Group: "", Version: "v1", Resource: "persistentvolumes"}