Skip to content

Commit

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

[release-1.6] 🐛 Fix for TestServerSideApplyWithDefaulting
  • Loading branch information
k8s-ci-robot committed Mar 27, 2024
2 parents f967c2f + 69b894d commit b8e8041
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,11 @@ func TestServerSideApplyWithDefaulting(t *testing.T) {
g.Expect(env.CleanupAndWait(ctx, kct.DeepCopy())).To(Succeed())
}()

// Wait until the initial KubeadmConfigTemplate is visible in the local cache. Otherwise the test fails below.
g.Eventually(ctx, func(g Gomega) {
g.Expect(env.Get(ctx, client.ObjectKeyFromObject(kct), &bootstrapv1.KubeadmConfigTemplate{})).To(Succeed())
}, 5*time.Second).Should(Succeed())

// Enable the new defaulting logic (i.e. simulate the Cluster API update).
// The webhook will default the users field to `[{Name: "default-user"}]`.
g.Expect(env.Create(ctx, mutatingWebhookConfiguration)).To(Succeed())
Expand Down

0 comments on commit b8e8041

Please sign in to comment.