Skip to content

Commit a031498

Browse files
committed
Clean up e2e control plane waiter names
1 parent 2e7a707 commit a031498

File tree

4 files changed

+30
-38
lines changed

4 files changed

+30
-38
lines changed

test/e2e/azure_test.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ var _ = Describe("Workload cluster creation", func() {
161161
withControlPlaneMachineCount(1),
162162
withWorkerMachineCount(1),
163163
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
164-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
164+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
165165
}),
166166
withPostMachinesProvisioned(func() {
167167
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -211,7 +211,7 @@ var _ = Describe("Workload cluster creation", func() {
211211
withWorkerMachineCount(2),
212212
withControlPlaneInterval(specName, "wait-control-plane-ha"),
213213
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
214-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
214+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
215215
}),
216216
withPostMachinesProvisioned(func() {
217217
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -309,7 +309,7 @@ var _ = Describe("Workload cluster creation", func() {
309309
withWorkerMachineCount(2),
310310
withControlPlaneInterval(specName, "wait-control-plane-ha"),
311311
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
312-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
312+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
313313
}),
314314
withPostMachinesProvisioned(func() {
315315
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -368,7 +368,7 @@ var _ = Describe("Workload cluster creation", func() {
368368
withControlPlaneMachineCount(1),
369369
withWorkerMachineCount(1),
370370
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
371-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
371+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
372372
}),
373373
withPostMachinesProvisioned(func() {
374374
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -406,7 +406,7 @@ var _ = Describe("Workload cluster creation", func() {
406406
withControlPlaneMachineCount(1),
407407
withWorkerMachineCount(1),
408408
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
409-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
409+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
410410
}),
411411
withPostMachinesProvisioned(func() {
412412
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -443,7 +443,7 @@ var _ = Describe("Workload cluster creation", func() {
443443
withControlPlaneMachineCount(1),
444444
withWorkerMachineCount(1),
445445
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
446-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
446+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
447447
}),
448448
withPostMachinesProvisioned(func() {
449449
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -481,7 +481,7 @@ var _ = Describe("Workload cluster creation", func() {
481481
withWorkerMachineCount(1),
482482
withControlPlaneInterval(specName, "wait-control-plane-ha"),
483483
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
484-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
484+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
485485
}),
486486
withPostMachinesProvisioned(func() {
487487
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -541,7 +541,7 @@ var _ = Describe("Workload cluster creation", func() {
541541
withControlPlaneInterval(specName, "wait-control-plane"),
542542
withMachinePoolInterval(specName, "wait-machine-pool-nodes"),
543543
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
544-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
544+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
545545
}),
546546
withPostMachinesProvisioned(func() {
547547
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -610,7 +610,7 @@ var _ = Describe("Workload cluster creation", func() {
610610
withWorkerMachineCount(1),
611611
withMachineDeploymentInterval(specName, "wait-gpu-nodes"),
612612
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
613-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
613+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
614614
}),
615615
withPostMachinesProvisioned(func() {
616616
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -668,7 +668,7 @@ var _ = Describe("Workload cluster creation", func() {
668668
withWorkerMachineCount(1),
669669
withMachineDeploymentInterval(specName, ""),
670670
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
671-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
671+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
672672
}),
673673
withMachinePoolInterval(specName, "wait-machine-pool-nodes"),
674674
withControlPlaneInterval(specName, "wait-control-plane"),
@@ -1008,7 +1008,7 @@ var _ = Describe("Workload cluster creation", func() {
10081008
withWorkerMachineCount(1),
10091009
withControlPlaneInterval(specName, "wait-control-plane-ha"),
10101010
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
1011-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
1011+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
10121012
}),
10131013
withPostMachinesProvisioned(func() {
10141014
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -1082,7 +1082,7 @@ var _ = Describe("Workload cluster creation", func() {
10821082
withControlPlaneMachineCount(1),
10831083
withWorkerMachineCount(1),
10841084
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
1085-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
1085+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
10861086
}),
10871087
withPostMachinesProvisioned(func() {
10881088
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -1180,7 +1180,7 @@ var _ = Describe("Workload cluster creation", func() {
11801180
withControlPlaneMachineCount(1),
11811181
withWorkerMachineCount(1),
11821182
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
1183-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
1183+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
11841184
}),
11851185
withPostMachinesProvisioned(func() {
11861186
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -1223,7 +1223,7 @@ var _ = Describe("Workload cluster creation", func() {
12231223
withWorkerMachineCount(2),
12241224
withControlPlaneInterval(specName, "wait-control-plane-ha"),
12251225
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
1226-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
1226+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
12271227
}),
12281228
withPostMachinesProvisioned(func() {
12291229
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
@@ -1274,7 +1274,7 @@ var _ = Describe("Workload cluster creation", func() {
12741274
withWorkerMachineCount(2),
12751275
withControlPlaneInterval(specName, "wait-control-plane-ha"),
12761276
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
1277-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
1277+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
12781278
}),
12791279
withPostMachinesProvisioned(func() {
12801280
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {

test/e2e/capi_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
8080
ArtifactFolder: artifactFolder,
8181
SkipCleanup: skipCleanup,
8282
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
83-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
83+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
8484
},
8585
}
8686
})
@@ -95,7 +95,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
9595
ArtifactFolder: artifactFolder,
9696
SkipCleanup: skipCleanup,
9797
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
98-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
98+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
9999
},
100100
}
101101
})
@@ -111,7 +111,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
111111
ArtifactFolder: artifactFolder,
112112
SkipCleanup: skipCleanup,
113113
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
114-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
114+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
115115
},
116116
}
117117
})
@@ -128,7 +128,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
128128
ArtifactFolder: artifactFolder,
129129
SkipCleanup: skipCleanup,
130130
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
131-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
131+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
132132
},
133133
}
134134
})
@@ -143,7 +143,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
143143
ArtifactFolder: artifactFolder,
144144
SkipCleanup: skipCleanup,
145145
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
146-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
146+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
147147
},
148148
}
149149
})
@@ -158,7 +158,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
158158
ArtifactFolder: artifactFolder,
159159
SkipCleanup: skipCleanup,
160160
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
161-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
161+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
162162
},
163163
}
164164
})
@@ -213,7 +213,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
213213
PreInit: getPreInitFunc(ctx),
214214
InitWithProvidersContract: "v1beta1",
215215
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
216-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
216+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
217217
},
218218
InitWithKubernetesVersion: e2eConfig.MustGetVariable(KubernetesVersionAPIUpgradeFrom),
219219
InitWithBinary: fmt.Sprintf("https://github.com/kubernetes-sigs/cluster-api/releases/download/%s/clusterctl-{OS}-{ARCH}", e2eConfig.MustGetVariable(OldCAPIUpgradeVersion)),
@@ -238,7 +238,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
238238
PreInit: getPreInitFunc(ctx),
239239
InitWithProvidersContract: "v1beta1",
240240
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
241-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
241+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
242242
},
243243
InitWithKubernetesVersion: e2eConfig.MustGetVariable(KubernetesVersionAPIUpgradeFrom),
244244
InitWithBinary: fmt.Sprintf("https://github.com/kubernetes-sigs/cluster-api/releases/download/%s/clusterctl-{OS}-{ARCH}", e2eConfig.MustGetVariable(LatestCAPIUpgradeVersion)),
@@ -263,7 +263,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
263263
SkipCleanup: skipCleanup,
264264
SkipConformanceTests: true,
265265
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
266-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
266+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
267267
},
268268
}
269269
})
@@ -281,7 +281,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
281281
SkipCleanup: skipCleanup,
282282
SkipConformanceTests: true,
283283
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
284-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
284+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
285285
},
286286
}
287287
})
@@ -300,7 +300,7 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
300300
SkipConformanceTests: true,
301301
Flavor: ptr.To("kcp-scale-in"),
302302
ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{
303-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
303+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
304304
},
305305
}
306306
})

test/e2e/common.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -253,19 +253,11 @@ func createRestConfig(ctx context.Context, tmpdir, namespace, clusterName string
253253
return config
254254
}
255255

256-
// EnsureControlPlaneInitializedNoAddons waits for the cluster KubeadmControlPlane object to be initialized
257-
// and then installs cloud-provider-azure components via Helm.
256+
// EnsureControlPlaneInitialized waits for the cluster KubeadmControlPlane object to be initialized
257+
// and then waits for cloud-provider-azure components installed via CAAPH.
258258
// Fulfills the clusterctl.Waiter type so that it can be used as ApplyClusterTemplateAndWaitInput data
259259
// in the flow of a clusterctl.ApplyClusterTemplateAndWait E2E test scenario.
260-
func EnsureControlPlaneInitializedNoAddons(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, result *clusterctl.ApplyCustomClusterTemplateAndWaitResult) {
261-
ensureControlPlaneInitialized(ctx, input, result)
262-
}
263-
264-
// ensureControlPlaneInitialized waits for the cluster KubeadmControlPlane object to be initialized
265-
// and then installs cloud-provider-azure components via Helm.
266-
// Fulfills the clusterctl.Waiter type so that it can be used as ApplyClusterTemplateAndWaitInput data
267-
// in the flow of a clusterctl.ApplyClusterTemplateAndWait E2E test scenario.
268-
func ensureControlPlaneInitialized(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, result *clusterctl.ApplyCustomClusterTemplateAndWaitResult) {
260+
func EnsureControlPlaneInitialized(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, result *clusterctl.ApplyCustomClusterTemplateAndWaitResult) {
269261
getter := input.ClusterProxy.GetClient()
270262
cluster := framework.GetClusterByName(ctx, framework.GetClusterByNameInput{
271263
Getter: getter,

test/e2e/conformance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ var _ = Describe("Conformance Tests", func() {
153153
withControlPlaneMachineCount(controlPlaneMachineCount),
154154
withWorkerMachineCount(linuxWorkerMachineCount),
155155
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
156-
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
156+
WaitForControlPlaneInitialized: EnsureControlPlaneInitialized,
157157
}),
158158
), result)
159159
stopwatch.Record("cluster creation")

0 commit comments

Comments
 (0)