@@ -40,7 +40,7 @@ var _ = Describe("Workload cluster creation", func() {
40
40
namespace * corev1.Namespace
41
41
cancelWatches context.CancelFunc
42
42
result * clusterctl.ApplyClusterTemplateAndWaitResult
43
- clusterName string
43
+ clusterNamePrefix string
44
44
clusterctlLogFolder string
45
45
)
46
46
@@ -52,7 +52,7 @@ var _ = Describe("Workload cluster creation", func() {
52
52
53
53
Expect (e2eConfig .Variables ).To (HaveKey (KubernetesVersion ))
54
54
55
- clusterName = fmt .Sprintf ("capg-e2e-%s" , util .RandomString (6 ))
55
+ clusterNamePrefix = fmt .Sprintf ("capg-e2e-%s" , util .RandomString (6 ))
56
56
57
57
// Setup a Namespace where to host objects for this spec and create a watcher for the namespace events.
58
58
namespace , cancelWatches = setupSpecNamespace (ctx , specName , bootstrapClusterProxy , artifactFolder )
@@ -80,6 +80,7 @@ var _ = Describe("Workload cluster creation", func() {
80
80
81
81
Context ("Creating a single control-plane cluster" , func () {
82
82
It ("Should create a cluster with 1 worker node and can be scaled" , func () {
83
+ clusterName := fmt .Sprintf ("%s-single" , clusterNamePrefix )
83
84
By ("Initializes with 1 worker node" )
84
85
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
85
86
ClusterProxy : bootstrapClusterProxy ,
@@ -124,6 +125,7 @@ var _ = Describe("Workload cluster creation", func() {
124
125
125
126
Context ("Creating a highly available control-plane cluster" , func () {
126
127
It ("Should create a cluster with 3 control-plane and 2 worker nodes" , func () {
128
+ clusterName := fmt .Sprintf ("%s-ha" , clusterNamePrefix )
127
129
By ("Creating a high available cluster" )
128
130
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
129
131
ClusterProxy : bootstrapClusterProxy ,
@@ -148,6 +150,7 @@ var _ = Describe("Workload cluster creation", func() {
148
150
149
151
Context ("Creating a single control-plane cluster with per cluster credentials" , func () {
150
152
It ("Should create a cluster with 1 worker node" , func () {
153
+ clusterName := fmt .Sprintf ("%s-with-creds" , clusterNamePrefix )
151
154
By ("Create the credentials secret" )
152
155
153
156
credsFile := os .Getenv ("GOOGLE_APPLICATION_CREDENTIALS" )
@@ -185,6 +188,7 @@ var _ = Describe("Workload cluster creation", func() {
185
188
186
189
Context ("Creating a control-plane cluster with an internal load balancer" , func () {
187
190
It ("Should create a cluster with 1 control-plane and 1 worker node with an internal load balancer" , func () {
191
+ clusterName := fmt .Sprintf ("%s-internal-lb" , clusterNamePrefix )
188
192
By ("Creating a cluster with internal load balancer" )
189
193
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
190
194
ClusterProxy : bootstrapClusterProxy ,
@@ -209,6 +213,7 @@ var _ = Describe("Workload cluster creation", func() {
209
213
210
214
Context ("Creating a cluster using a cluster class" , func () {
211
215
It ("Should create a cluster class and then a cluster based on it" , func () {
216
+ clusterName := fmt .Sprintf ("%s-topology" , clusterNamePrefix )
212
217
By ("Creating a cluster from a topology" )
213
218
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
214
219
ClusterProxy : bootstrapClusterProxy ,
0 commit comments