Skip to content

Commit 5683652

Browse files
committed
fixup: fix flaky crd tests
Signed-off-by: Janelle Law <[email protected]>
1 parent 94dd309 commit 5683652

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/e2e/case38_install_operator_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,7 +1906,7 @@ var _ = Describe("Testing OperatorPolicy", Label("supports-hosted"), func() {
19061906
parentPolicyName = getParentPolicyName()
19071907

19081908
preFunc()
1909-
KubectlTarget("delete", "crd", crdName, "--ignore-not-found")
1909+
KubectlTarget("delete", "crd", crdName, "--wait", "--ignore-not-found")
19101910
setupPolicy(opPolYAML, opPolName, parentPolicyName)
19111911
})
19121912
It("Should initially not report on CRDs because they won't exist yet", func() {
@@ -2028,7 +2028,7 @@ var _ = Describe("Testing OperatorPolicy", Label("supports-hosted"), func() {
20282028
parentPolicyName = getParentPolicyName()
20292029

20302030
preFunc()
2031-
KubectlTarget("delete", "crd", crdName, "--ignore-not-found")
2031+
KubectlTarget("delete", "crd", crdName, "--wait", "--ignore-not-found")
20322032
setupPolicy(opPolYAML, opPolName, parentPolicyName)
20332033
})
20342034

@@ -2934,7 +2934,7 @@ var _ = Describe("Testing OperatorPolicy", Label("supports-hosted"), func() {
29342934
parentPolicyName = getParentPolicyName()
29352935

29362936
preFunc()
2937-
KubectlTarget("delete", "crd", crdName, "--ignore-not-found")
2937+
KubectlTarget("delete", "crd", crdName, "--wait", "--ignore-not-found")
29382938
setupPolicy(opPolYAML, opPolName, parentPolicyName)
29392939
})
29402940
AfterAll(func(ctx SpecContext) {
@@ -2985,6 +2985,7 @@ var _ = Describe("Testing OperatorPolicy", Label("supports-hosted"), func() {
29852985
Message: "there are CRDs present for the operator",
29862986
},
29872987
"there are CRDs present for the operator",
2988+
skipConsistently,
29882989
)
29892990

29902991
By("Adding a finalizer to the CRD")
@@ -3073,7 +3074,7 @@ var _ = Describe("Testing OperatorPolicy", Label("supports-hosted"), func() {
30733074
parentPolicyName = getParentPolicyName()
30743075

30753076
preFunc()
3076-
KubectlTarget("delete", "crd", crdName, "--ignore-not-found")
3077+
KubectlTarget("delete", "crd", crdName, "--wait", "--ignore-not-found")
30773078
setupPolicy(opPolYAML, opPolName, parentPolicyName)
30783079
})
30793080

0 commit comments

Comments
 (0)