From 47cdf793ad553f473421ffbc1e7639ac3cd2f74a Mon Sep 17 00:00:00 2001 From: Loic Devulder Date: Mon, 25 Sep 2023 10:14:22 +0200 Subject: [PATCH] ci: fix cluster check in sequential test In sequential test the cluster takes more time to appear. Signed-off-by: Loic Devulder --- tests/e2e/suite_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/e2e/suite_test.go b/tests/e2e/suite_test.go index 58a9ebb54..aa43af617 100644 --- a/tests/e2e/suite_test.go +++ b/tests/e2e/suite_test.go @@ -137,11 +137,12 @@ func CheckClusterState(ns, cluster string) { } // Check that the cluster is in Ready state (this means that it has been created) - clusterStatus, err := kubectl.Run("get", "cluster", - "--namespace", ns, cluster, - "-o", "jsonpath={.status.ready}") - Expect(err).To(Not(HaveOccurred())) - Expect(clusterStatus).To(Equal("true")) + Eventually(func() string { + status, _ := kubectl.Run("get", "cluster", + "--namespace", ns, cluster, + "-o", "jsonpath={.status.ready}") + return status + }, tools.SetTimeout(2*time.Duration(usedNodes)*time.Minute), 10*time.Second).Should(Equal("true")) // Check that all needed conditions are in the good state for _, s := range states {