Skip to content

Commit

Permalink
Fix for TestServerSideApplyWithDefaulting
Browse files Browse the repository at this point in the history
Signed-off-by: muhammad adil ghaffar <[email protected]>
  • Loading branch information
adilGhaffarDev authored and k8s-infra-cherrypick-robot committed Mar 28, 2024
1 parent 64d7ea5 commit b660b01
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 b660b01

Please sign in to comment.