From 95cf6247a8edf17e253f610837e4e70f7db34576 Mon Sep 17 00:00:00 2001 From: Shaad7 Date: Fri, 26 Jan 2024 15:10:15 +0600 Subject: [PATCH] Update GKE Test for custom subnet Signed-off-by: Shaad7 --- test/e2e/e2e_gke_test.go | 29 +++++++++++++++++++++++++++++ test/e2e/e2e_test.go | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/test/e2e/e2e_gke_test.go b/test/e2e/e2e_gke_test.go index b158345e8..e1171138d 100644 --- a/test/e2e/e2e_gke_test.go +++ b/test/e2e/e2e_gke_test.go @@ -159,4 +159,33 @@ var _ = Describe("GKE workload cluster creation", func() { }, result) }) }) + + Context("Creating a GKE cluster with custom subnet", func() { + It("Should create a cluster with 3 machine pool and custom subnet", func() { + By("Initializes with 3 machine pool") + + ApplyManagedClusterTemplateAndWait(ctx, ApplyManagedClusterTemplateAndWaitInput{ + ClusterProxy: bootstrapClusterProxy, + ConfigCluster: clusterctl.ConfigClusterInput{ + LogFolder: clusterctlLogFolder, + ClusterctlConfigPath: clusterctlConfigPath, + KubeconfigPath: bootstrapClusterProxy.GetKubeconfigPath(), + InfrastructureProvider: clusterctl.DefaultInfrastructureProvider, + Flavor: "ci-gke-custom-subnet", + Namespace: namespace.Name, + ClusterName: clusterName, + KubernetesVersion: e2eConfig.GetVariable(KubernetesVersion), + ControlPlaneMachineCount: pointer.Int64Ptr(1), + WorkerMachineCount: pointer.Int64Ptr(3), + ClusterctlVariables: map[string]string{ + "GCP_SUBNET_NAME": "capg-test-subnet", + "GCP_SUBNET_CIDR": "172.20.0.0/16", + }, + }, + WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"), + WaitForControlPlaneIntervals: e2eConfig.GetIntervals(specName, "wait-control-plane"), + WaitForMachinePools: e2eConfig.GetIntervals(specName, "wait-worker-machine-pools"), + }, result) + }) + }) }) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 3fab807f9..ffb7e448b 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -182,33 +182,4 @@ var _ = Describe("Workload cluster creation", func() { }, result) }) }) - - Context("Creating a single control-plane cluster", func() { - It("Should create a cluster with 3 worker node with custom subnet", func() { - By("Initializes with 3 worker node") - clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{ - ClusterProxy: bootstrapClusterProxy, - ConfigCluster: clusterctl.ConfigClusterInput{ - LogFolder: clusterctlLogFolder, - ClusterctlConfigPath: clusterctlConfigPath, - KubeconfigPath: bootstrapClusterProxy.GetKubeconfigPath(), - InfrastructureProvider: clusterctl.DefaultInfrastructureProvider, - Flavor: "ci-gke-custom-subnet", - Namespace: namespace.Name, - ClusterName: clusterName, - KubernetesVersion: e2eConfig.GetVariable(KubernetesVersion), - ControlPlaneMachineCount: pointer.Int64Ptr(1), - WorkerMachineCount: pointer.Int64Ptr(3), - ClusterctlVariables: map[string]string{ - "GCP_SUBNET_NAME": "capg-test-subnet", - "GCP_SUBNET_CIDR": "172.20.0.0/16", - }, - }, - WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"), - WaitForControlPlaneIntervals: e2eConfig.GetIntervals(specName, "wait-control-plane"), - WaitForMachineDeployments: e2eConfig.GetIntervals(specName, "wait-worker-nodes"), - }, result) - - }) - }) })