Skip to content

Commit

Permalink
Merge pull request #9823 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…9745-to-release-1.5

[release-1.5] 🐛 Fix TestReconcileMachinePoolScaleToFromZero flakes
  • Loading branch information
k8s-ci-robot authored Dec 7, 2023
2 parents 1eb9be9 + abb9dd8 commit 6fe425c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions exp/internal/controllers/machinepool_controller_phases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1514,11 +1514,11 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) {
Namespace: ns.Name,
},
}
g.Expect(env.Create(ctx, testCluster)).To(Succeed())
g.Expect(env.CreateAndWait(ctx, testCluster)).To(Succeed())
g.Expect(env.CreateKubeconfigSecret(ctx, testCluster)).To(Succeed())
defer func(do ...client.Object) {
g.Expect(env.Cleanup(ctx, do...)).To(Succeed())
}(ns, testCluster)
g.Expect(env.CleanupAndWait(ctx, do...)).To(Succeed())
}(testCluster)

defaultMachinePool := expv1.MachinePool{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -1594,9 +1594,9 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) {
},
},
}
g.Expect(env.Create(ctx, node)).To(Succeed())
g.Expect(env.CreateAndWait(ctx, node)).To(Succeed())
defer func(do ...client.Object) {
g.Expect(env.Cleanup(ctx, do...)).To(Succeed())
g.Expect(env.CleanupAndWait(ctx, do...)).To(Succeed())
}(node)

kubeconfigSecret := kubeconfig.GenerateSecret(testCluster, kubeconfig.FromEnvTestConfig(env.Config, testCluster))
Expand Down Expand Up @@ -1657,7 +1657,7 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) {
}
g.Expect(env.CreateAndWait(ctx, node)).To(Succeed())
defer func(do ...client.Object) {
g.Expect(env.Cleanup(ctx, do...)).To(Succeed())
g.Expect(env.CleanupAndWait(ctx, do...)).To(Succeed())
}(node)

kubeconfigSecret := kubeconfig.GenerateSecret(testCluster, kubeconfig.FromEnvTestConfig(env.Config, testCluster))
Expand Down Expand Up @@ -1781,9 +1781,9 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) {
},
},
}
g.Expect(env.Create(ctx, node)).To(Succeed())
g.Expect(env.CreateAndWait(ctx, node)).To(Succeed())
defer func(do ...client.Object) {
g.Expect(env.Cleanup(ctx, do...)).To(Succeed())
g.Expect(env.CleanupAndWait(ctx, do...)).To(Succeed())
}(node)

kubeconfigSecret := kubeconfig.GenerateSecret(testCluster, kubeconfig.FromEnvTestConfig(env.Config, testCluster))
Expand Down

0 comments on commit 6fe425c

Please sign in to comment.