Skip to content

Commit

Permalink
Update GKE Test for custom subnet
Browse files Browse the repository at this point in the history
Signed-off-by: Shaad7 <abdullah.alshaad@appscode.com>
  • Loading branch information
AbdullahAlShaad committed Jan 26, 2024
1 parent a1571fc commit 95cf624
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
29 changes: 29 additions & 0 deletions test/e2e/e2e_gke_test.go
Expand Up @@ -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)
})
})
})
29 changes: 0 additions & 29 deletions test/e2e/e2e_test.go
Expand Up @@ -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)

})
})
})

0 comments on commit 95cf624

Please sign in to comment.