Skip to content

Commit cbb479a

Browse files
committed
test: add missing cluster name in e2e test case and truncate length
Signed-off-by: Carlos Salas <[email protected]>
1 parent 7ce8568 commit cbb479a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/e2e/e2e_gke_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var _ = Describe("GKE workload cluster creation", func() {
5757

5858
Expect(e2eConfig.Variables).To(HaveKey(KubernetesVersion))
5959

60-
clusterNamePrefix = fmt.Sprintf("capg-e2e-gke-%s", util.RandomString(6))
60+
clusterNamePrefix = fmt.Sprintf("capg-e2e-gke-%s", util.RandomString(4))
6161

6262
// Setup a Namespace where to host objects for this spec and create a watcher for the namespace events.
6363
namespace, cancelWatches = setupSpecNamespace(ctx, specName, bootstrapClusterProxy, artifactFolder)
@@ -145,7 +145,7 @@ var _ = Describe("GKE workload cluster creation", func() {
145145

146146
Context("Creating a GKE cluster with autopilot", func() {
147147
It("Should create a cluster with 1 machine pool and scale", func() {
148-
clusterName := fmt.Sprintf("%s-autopilot", clusterNamePrefix)
148+
clusterName := fmt.Sprintf("%s-ap", clusterNamePrefix)
149149
By("Initializes with 1 machine pool")
150150

151151
ApplyManagedClusterTemplateAndWait(ctx, ApplyManagedClusterTemplateAndWaitInput{
@@ -171,7 +171,7 @@ var _ = Describe("GKE workload cluster creation", func() {
171171

172172
Context("Creating a GKE cluster with custom subnet", func() {
173173
It("Should create a cluster with 3 machine pool and custom subnet", func() {
174-
clusterName := fmt.Sprintf("%s-custom-subnet", clusterNamePrefix)
174+
clusterName := fmt.Sprintf("%s-cust-snet", clusterNamePrefix)
175175
By("Initializes with 3 machine pool")
176176

177177
ApplyManagedClusterTemplateAndWait(ctx, ApplyManagedClusterTemplateAndWaitInput{
@@ -201,6 +201,7 @@ var _ = Describe("GKE workload cluster creation", func() {
201201

202202
Context("Creating a GKE cluster with autopilot from a cluster class", func() {
203203
It("Should create a cluster class and a cluster from it", func() {
204+
clusterName := fmt.Sprintf("%s-cc", clusterNamePrefix)
204205
By("Initializes a managed control plane and managed cluster")
205206

206207
ApplyManagedClusterTemplateAndWait(ctx, ApplyManagedClusterTemplateAndWaitInput{

0 commit comments

Comments
 (0)