From 43c776ad0bd78224eada2f5434d9e79de77fb320 Mon Sep 17 00:00:00 2001 From: Jakub Sliacan Date: Wed, 27 Sep 2023 21:00:38 +0200 Subject: [PATCH] integration: wait for cluster in state In e2e e use WaitForClusterInState after `crc start` exits with 0 to give time to the cluster to stabilize (all operators are reliably up). This is also needed here before we login to the cluster. --- test/integration/proxy_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/integration/proxy_test.go b/test/integration/proxy_test.go index 50f1b30a29..62a4f8ff2f 100644 --- a/test/integration/proxy_test.go +++ b/test/integration/proxy_test.go @@ -4,6 +4,7 @@ import ( "os/exec" "runtime" + crcCmd "github.com/crc-org/crc/v2/test/extended/crc/cmd" "github.com/crc-org/crc/v2/test/extended/util" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -62,6 +63,11 @@ var _ = Describe("", Serial, Ordered, Label("openshift-preset", "goproxy"), func } }) + It("wait for cluster in Running state", func() { + err := crcCmd.WaitForClusterInState("running") + Expect(err).NotTo(HaveOccurred()) + }) + It("login to cluster using crc-admin context", func() { err := util.AddOCToPath()