Skip to content

Commit 9ed9287

Browse files
committed
test: cover cluster creation via topology in e2e
Signed-off-by: Carlos Salas <[email protected]>
1 parent 7d14b25 commit 9ed9287

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

test/e2e/config/gcp-ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ providers:
6767
- sourcePath: "${PWD}/test/e2e/data/infrastructure-gcp/cluster-template-md-remediation.yaml"
6868
- sourcePath: "${PWD}/test/e2e/data/infrastructure-gcp/cluster-template-kcp-remediation.yaml"
6969
- sourcePath: "${PWD}/test/e2e/data/infrastructure-gcp/cluster-template-topology.yaml"
70-
- sourcePath: "${PWD}/test/e2e/data/infrastructure-gcp/clusterclass-quick-start.yaml"
7170
- sourcePath: "${PWD}/test/e2e/data/infrastructure-gcp/cluster-template-ci-with-creds.yaml"
7271
- sourcePath: "${PWD}/test/e2e/data/infrastructure-gcp/cluster-template-ci-gke.yaml"
7372
- sourcePath: "${PWD}/test/e2e/data/infrastructure-gcp/cluster-template-ci-gke-autopilot.yaml"

test/e2e/e2e_test.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,28 @@ var _ = Describe("Workload cluster creation", func() {
206206
}, result)
207207
})
208208
})
209+
210+
Context("Creating a cluster using a cluster class", func() {
211+
It("Should create a cluster class and then a cluster based on it", func() {
212+
By("Creating a cluster from a topology")
213+
clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{
214+
ClusterProxy: bootstrapClusterProxy,
215+
ConfigCluster: clusterctl.ConfigClusterInput{
216+
LogFolder: clusterctlLogFolder,
217+
ClusterctlConfigPath: clusterctlConfigPath,
218+
KubeconfigPath: bootstrapClusterProxy.GetKubeconfigPath(),
219+
InfrastructureProvider: clusterctl.DefaultInfrastructureProvider,
220+
Flavor: "ci-topology",
221+
Namespace: namespace.Name,
222+
ClusterName: clusterName,
223+
KubernetesVersion: e2eConfig.GetVariable(KubernetesVersion),
224+
ControlPlaneMachineCount: ptr.To[int64](1),
225+
WorkerMachineCount: ptr.To[int64](1),
226+
},
227+
WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"),
228+
WaitForControlPlaneIntervals: e2eConfig.GetIntervals(specName, "wait-control-plane"),
229+
WaitForMachineDeployments: e2eConfig.GetIntervals(specName, "wait-worker-nodes"),
230+
}, result)
231+
})
232+
})
209233
})

0 commit comments

Comments
 (0)