@@ -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 )
@@ -79,6 +79,7 @@ var _ = Describe("Workload cluster creation", func() {
79
79
})
80
80
81
81
Context ("Creating a single control-plane cluster" , func () {
82
+ clusterName := fmt .Sprintf ("%s-single" , clusterNamePrefix )
82
83
It ("Should create a cluster with 1 worker node and can be scaled" , func () {
83
84
By ("Initializes with 1 worker node" )
84
85
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
@@ -123,6 +124,7 @@ var _ = Describe("Workload cluster creation", func() {
123
124
})
124
125
125
126
Context ("Creating a highly available control-plane cluster" , func () {
127
+ clusterName := fmt .Sprintf ("%s-ha" , clusterNamePrefix )
126
128
It ("Should create a cluster with 3 control-plane and 2 worker nodes" , func () {
127
129
By ("Creating a high available cluster" )
128
130
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
@@ -147,6 +149,7 @@ var _ = Describe("Workload cluster creation", func() {
147
149
})
148
150
149
151
Context ("Creating a single control-plane cluster with per cluster credentials" , func () {
152
+ clusterName := fmt .Sprintf ("%s-with-creds" , clusterNamePrefix )
150
153
It ("Should create a cluster with 1 worker node" , func () {
151
154
By ("Create the credentials secret" )
152
155
@@ -184,6 +187,7 @@ var _ = Describe("Workload cluster creation", func() {
184
187
})
185
188
186
189
Context ("Creating a control-plane cluster with an internal load balancer" , func () {
190
+ clusterName := fmt .Sprintf ("%s-internal-lb" , clusterNamePrefix )
187
191
It ("Should create a cluster with 1 control-plane and 1 worker node with an internal load balancer" , func () {
188
192
By ("Creating a cluster with internal load balancer" )
189
193
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
@@ -208,6 +212,7 @@ var _ = Describe("Workload cluster creation", func() {
208
212
})
209
213
210
214
Context ("Creating a cluster using a cluster class" , func () {
215
+ clusterName := fmt .Sprintf ("%s-topology" , clusterNamePrefix )
211
216
It ("Should create a cluster class and then a cluster based on it" , func () {
212
217
By ("Creating a cluster from a topology" )
213
218
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
0 commit comments