Skip to content

Commit c53da18

Browse files
committed
Try to fix test flake in which secret is not yet available
1 parent ffa284d commit c53da18

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

exp/controllers/awsmachinepool_controller_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,12 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
913913
},
914914
}
915915
g.Expect(testEnv.Create(ctx, newBootstrapSecret)).To(Succeed())
916+
g.Eventually(func(gomega Gomega) {
917+
gomega.Expect(testEnv.Client.Get(ctx, client.ObjectKey{
918+
Name: newBootstrapSecret.Name,
919+
Namespace: newBootstrapSecret.Namespace,
920+
}, newBootstrapSecret)).To(Succeed())
921+
}).Should(Succeed())
916922
ms.MachinePool.Spec.Template.Spec.Bootstrap.DataSecretName = ptr.To[string](newBootstrapSecret.Name)
917923

918924
// Since `AWSMachinePool.status.launchTemplateVersion` isn't set yet,

0 commit comments

Comments
 (0)