diff --git a/test/e2e/adminapi_cluster_update.go b/test/e2e/adminapi_cluster_update.go index 4c52afe55c3..efea568f5ba 100644 --- a/test/e2e/adminapi_cluster_update.go +++ b/test/e2e/adminapi_cluster_update.go @@ -20,6 +20,12 @@ var _ = Describe("[Admin API] Cluster admin update action", Serial, func() { It("must run cluster update operation on a cluster", func(ctx context.Context) { var oc = &admin.OpenShiftCluster{} + // Wait for the cluster to be in a succeeded state before continuing + Eventually(func(g Gomega, ctx context.Context) { + oc = adminGetCluster(g, ctx, clusterResourceID) + g.Expect(oc.Properties.ProvisioningState).To(Equal(admin.ProvisioningStateSucceeded)) + }).WithContext(ctx).WithTimeout(DefaultEventuallyTimeout).Should(Succeed()) + By("triggering the update via RP admin API") resp, err := adminRequest(ctx, http.MethodPatch, clusterResourceID, nil, true, json.RawMessage("{}"), oc) Expect(err).NotTo(HaveOccurred()) diff --git a/test/e2e/mimo_actuator.go b/test/e2e/mimo_actuator.go index b8ac7ee8b9f..c11adc06c40 100644 --- a/test/e2e/mimo_actuator.go +++ b/test/e2e/mimo_actuator.go @@ -8,6 +8,7 @@ import ( "encoding/json" "net/http" "net/url" + "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -35,6 +36,9 @@ var _ = Describe("MIMO Actuator E2E Testing", Serial, func() { Expect(err).NotTo(HaveOccurred()) Expect(resp.StatusCode).To(Equal(http.StatusOK)) + // Wait for it to settle + time.Sleep(5 * time.Second) + // Wait for the flag reset to finish applying Eventually(func(g Gomega, ctx context.Context) { oc = adminGetCluster(g, ctx, clusterResourceID)