Skip to content

Commit

Permalink
Fix some KCP unit test flakes
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Büringer buringerst@vmware.com
  • Loading branch information
sbueringer committed May 31, 2024
1 parent ebdda34 commit 77ac940
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ func TestReconcileInitializeControlPlane(t *testing.T) {
},
},
}
g.Expect(env.Create(ctx, genericInfrastructureMachineTemplate)).To(Succeed())
g.Expect(env.CreateAndWait(ctx, genericInfrastructureMachineTemplate)).To(Succeed())

kcp := &controlplanev1.KubeadmControlPlane{
ObjectMeta: metav1.ObjectMeta{
Expand Down
4 changes: 2 additions & 2 deletions controlplane/kubeadm/internal/controllers/scale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestKubeadmControlPlaneReconciler_initializeControlPlane(t *testing.T) {
defer teardown(t, g, namespace)

cluster, kcp, genericInfrastructureMachineTemplate := createClusterWithControlPlane(namespace.Name)
g.Expect(env.Create(ctx, genericInfrastructureMachineTemplate, client.FieldOwner("manager"))).To(Succeed())
g.Expect(env.CreateAndWait(ctx, genericInfrastructureMachineTemplate, client.FieldOwner("manager"))).To(Succeed())
kcp.UID = types.UID(util.RandomString(10))

r := &KubeadmControlPlaneReconciler{
Expand Down Expand Up @@ -128,7 +128,7 @@ func TestKubeadmControlPlaneReconciler_scaleUpControlPlane(t *testing.T) {
defer teardown(t, g, namespace)

cluster, kcp, genericInfrastructureMachineTemplate := createClusterWithControlPlane(namespace.Name)
g.Expect(env.Create(ctx, genericInfrastructureMachineTemplate, client.FieldOwner("manager"))).To(Succeed())
g.Expect(env.CreateAndWait(ctx, genericInfrastructureMachineTemplate, client.FieldOwner("manager"))).To(Succeed())
kcp.UID = types.UID(util.RandomString(10))
setKCPHealthy(kcp)

Expand Down

0 comments on commit 77ac940

Please sign in to comment.