Skip to content

Commit c99ca95

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 c99ca95

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/e2e/e2e_gke_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const (
4141
var _ = Describe("GKE workload cluster creation", func() {
4242
var (
4343
ctx = context.TODO()
44-
specName = "create-gke-workload-cluster"
44+
specName = "gke"
4545
namespace *corev1.Namespace
4646
cancelWatches context.CancelFunc
4747
result *ApplyManagedClusterTemplateAndWaitResult
@@ -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("%s-%s", specName, util.RandomString(6))
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)