Skip to content

Commit

Permalink
test: use eventually to wait for cluster record to appear
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Salas <carlos.salas@suse.com>
  • Loading branch information
salasberryfin committed Feb 29, 2024
1 parent b3ed210 commit 9f4d45f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/e2e/specs/import_gitops_mgmtv3.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,10 @@ func CreateMgmtV3UsingGitOpsSpec(ctx context.Context, inputGetter func() CreateM
input.OwnedLabelName: "",
},
}
Eventually(komega.List(rancherClusters, selectors...)).Should(Succeed())
Expect(rancherClusters.Items).To(HaveLen(1))
Eventually(func() {
Eventually(komega.List(rancherClusters, selectors...)).Should(Succeed())
Expect(rancherClusters.Items).To(HaveLen(1))
}, input.E2EConfig.GetIntervals(input.BootstrapClusterProxy.GetName(), "wait-rancher")...).Should(BeTrue())
rancherCluster = &rancherClusters.Items[0]
Eventually(komega.Get(rancherCluster), input.E2EConfig.GetIntervals(input.BootstrapClusterProxy.GetName(), "wait-rancher")...).Should(Succeed())

Expand Down

0 comments on commit 9f4d45f

Please sign in to comment.