Skip to content

Commit

Permalink
Fix issue with patching AWSCluster
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Squizzato <[email protected]>
  • Loading branch information
squizzi committed Sep 12, 2024
1 parent 04f1514 commit 413c565
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,15 @@ var _ = Describe("controller", Ordered, func() {
// https://docs.k0smotron.io/stable/capi-aws/#prepare-the-aws-infra-provider
// Use Eventually as the AWSCluster might not be available
// immediately.
Eventually(aws.PatchAWSClusterReady(context.Background(), standaloneClient, hd.GetName())).
WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
templateBy(managedcluster.TemplateAWSHostedCP, "Patching AWSCluster to ready")
Eventually(func() error {
if err := aws.PatchAWSClusterReady(context.Background(), standaloneClient, hd.GetName()); err != nil {
_, _ = fmt.Fprintf(GinkgoWriter, "failed to patch AWSCluster to ready: %v, retrying...\n", err)
return err
}
_, _ = fmt.Fprintf(GinkgoWriter, "Patch succeeded\n")
return nil
}).WithTimeout(time.Minute).WithPolling(5 * time.Second).Should(Succeed())

// Verify the hosted cluster is running/ready.
templateBy(managedcluster.TemplateAWSHostedCP, "waiting for infrastructure to deploy successfully")
Expand Down

0 comments on commit 413c565

Please sign in to comment.