Skip to content

Commit

Permalink
more e2e deflake attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed Dec 3, 2024
1 parent 3bf59a2 commit e7b9b5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/e2e/adminapi_cluster_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
4 changes: 4 additions & 0 deletions test/e2e/mimo_actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"encoding/json"
"net/http"
"net/url"
"time"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e7b9b5e

Please sign in to comment.