diff --git a/test/e2e/case21_alternative_kubeconfig_test.go b/test/e2e/case21_alternative_kubeconfig_test.go index 7ecd01f6..e3d09469 100644 --- a/test/e2e/case21_alternative_kubeconfig_test.go +++ b/test/e2e/case21_alternative_kubeconfig_test.go @@ -68,7 +68,7 @@ var _ = Describe("Test an alternative kubeconfig for policy evaluation", Ordered ) return utils.GetComplianceState(managedPlc) - }, defaultTimeoutSeconds, 1).Should(Equal("Compliant")) + }, defaultTimeoutSeconds*2, 1).Should(Equal("Compliant")) By("Verifying that the " + policyName + " was created using the alternative kubeconfig") _, err := targetK8sClient.CoreV1().Namespaces().Get(context.TODO(), namespaceName, metav1.GetOptions{}) diff --git a/test/e2e/case38_install_operator_test.go b/test/e2e/case38_install_operator_test.go index c3c057be..32f8351b 100644 --- a/test/e2e/case38_install_operator_test.go +++ b/test/e2e/case38_install_operator_test.go @@ -99,10 +99,12 @@ var _ = Describe("Test installing an operator from OperatorPolicy", Ordered, fun }) It("Should become Compliant", func() { - OpPlc := utils.GetWithTimeout(clientManagedDynamic, gvrOperatorPolicy, - case38OpPolicyDefaultOgName, case38OpPolicyDefaultOgNS, true, defaultTimeoutSeconds) + Eventually(func() interface{} { + OpPlc := utils.GetWithTimeout(clientManagedDynamic, gvrOperatorPolicy, + case38OpPolicyDefaultOgName, case38OpPolicyDefaultOgNS, true, defaultTimeoutSeconds) - Expect(utils.GetComplianceState(OpPlc)).To(Equal("Compliant")) + return utils.GetComplianceState(OpPlc) + }, defaultTimeoutSeconds, 1).Should(Equal("Compliant")) }) It("Should have installed the operator", func() {