Skip to content

Commit 31b8bfa

Browse files
committed
test(e2e): switch eventually to consistently and wait for argocd available
Signed-off-by: Jonathan West <jgwest@gmail.com>
1 parent e2c14b0 commit 31b8bfa

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

tests/ginkgo/sequential/1-051_validate_argocd_agent_principal_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,16 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() {
946946
argoCD.Spec.DefaultClusterScopedRoleDisabled = true
947947
Expect(k8sClient.Create(ctx, argoCD)).To(Succeed())
948948

949+
By("Verify Argo CD CR is reconciled")
950+
Eventually(principalDeployment).Should(k8sFixture.ExistByName())
951+
949952
By("Verify ClusterRole and ClusterRoleBinding do not exist")
950953
Eventually(clusterRole, "60s", "2s").Should(k8sFixture.NotExistByName())
951954
Eventually(clusterRoleBinding, "60s", "2s").Should(k8sFixture.NotExistByName())
952955

956+
Consistently(clusterRole, "15s", "2s").Should(k8sFixture.NotExistByName())
957+
Consistently(clusterRoleBinding, "15s", "2s").Should(k8sFixture.NotExistByName())
958+
953959
By("Namespaced RBAC objects should still exist")
954960
Eventually(role, "60s", "2s").Should(k8sFixture.ExistByName())
955961
Eventually(roleBinding, "60s", "2s").Should(k8sFixture.ExistByName())
@@ -967,6 +973,8 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() {
967973
})
968974
Eventually(clusterRole, "60s", "2s").Should(k8sFixture.NotExistByName())
969975
Eventually(clusterRoleBinding, "60s", "2s").Should(k8sFixture.NotExistByName())
976+
Consistently(clusterRole, "10s", "2s").Should(k8sFixture.NotExistByName())
977+
Consistently(clusterRoleBinding, "10s", "2s").Should(k8sFixture.NotExistByName())
970978
})
971979
})
972980
})

tests/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,14 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() {
628628
argoCD.Spec.DefaultClusterScopedRoleDisabled = true
629629
Expect(k8sClient.Create(ctx, argoCD)).To(Succeed())
630630

631+
By("Verify Argo CD becomes available")
632+
Eventually(argoCD, "5m", "5s").Should(argocdFixture.BeAvailable())
633+
631634
By("Verify ClusterRole and ClusterRoleBinding do not exist")
632635
Eventually(clusterRole, "60s", "2s").Should(k8sFixture.NotExistByName())
633636
Eventually(clusterRoleBinding, "60s", "2s").Should(k8sFixture.NotExistByName())
637+
Consistently(clusterRole, "15s", "2s").Should(k8sFixture.NotExistByName())
638+
Consistently(clusterRoleBinding, "15s", "2s").Should(k8sFixture.NotExistByName())
634639

635640
By("Namespaced RBAC objects should still exist")
636641
Eventually(role, "60s", "2s").Should(k8sFixture.ExistByName())
@@ -649,6 +654,8 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() {
649654
})
650655
Eventually(clusterRole, "60s", "2s").Should(k8sFixture.NotExistByName())
651656
Eventually(clusterRoleBinding, "60s", "2s").Should(k8sFixture.NotExistByName())
657+
Consistently(clusterRole, "10s", "2s").Should(k8sFixture.NotExistByName())
658+
Consistently(clusterRoleBinding, "10s", "2s").Should(k8sFixture.NotExistByName())
652659
})
653660
})
654661
})

0 commit comments

Comments
 (0)