@@ -46,11 +46,12 @@ import (
46
46
"sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared"
47
47
)
48
48
49
+ const specName = "e2e"
50
+
49
51
var _ = Describe ("e2e tests" , func () {
50
52
var (
51
53
namespace * corev1.Namespace
52
54
ctx context.Context
53
- specName = "e2e"
54
55
)
55
56
56
57
BeforeEach (func () {
@@ -71,7 +72,7 @@ var _ = Describe("e2e tests", func() {
71
72
configCluster .ControlPlaneMachineCount = pointer .Int64Ptr (3 )
72
73
configCluster .WorkerMachineCount = pointer .Int64Ptr (1 )
73
74
configCluster .Flavor = shared .FlavorDefault
74
- md := createCluster (ctx , configCluster , specName )
75
+ md := createCluster (ctx , configCluster )
75
76
76
77
workerMachines := framework .GetMachinesByMachineDeployments (ctx , framework.GetMachinesByMachineDeploymentsInput {
77
78
Lister : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
@@ -97,7 +98,7 @@ var _ = Describe("e2e tests", func() {
97
98
configCluster .ControlPlaneMachineCount = pointer .Int64Ptr (1 )
98
99
configCluster .WorkerMachineCount = pointer .Int64Ptr (1 )
99
100
configCluster .Flavor = shared .FlavorExternalCloudProvider
100
- md := createCluster (ctx , configCluster , specName )
101
+ md := createCluster (ctx , configCluster )
101
102
102
103
workerMachines := framework .GetMachinesByMachineDeployments (ctx , framework.GetMachinesByMachineDeploymentsInput {
103
104
Lister : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
@@ -138,7 +139,7 @@ var _ = Describe("e2e tests", func() {
138
139
configCluster .ControlPlaneMachineCount = pointer .Int64Ptr (1 )
139
140
configCluster .WorkerMachineCount = pointer .Int64Ptr (1 )
140
141
configCluster .Flavor = shared .FlavorWithoutLB
141
- _ = createCluster (ctx , configCluster , specName )
142
+ _ = createCluster (ctx , configCluster )
142
143
143
144
shared .Byf ("Creating MachineDeployment with custom port options" )
144
145
md3Name := clusterName + "-md-3"
@@ -174,7 +175,7 @@ var _ = Describe("e2e tests", func() {
174
175
configCluster .ControlPlaneMachineCount = pointer .Int64Ptr (1 )
175
176
configCluster .WorkerMachineCount = pointer .Int64Ptr (1 )
176
177
configCluster .Flavor = shared .FlavorWithoutLB
177
- md := createCluster (ctx , configCluster , specName )
178
+ md := createCluster (ctx , configCluster )
178
179
179
180
workerMachines := framework .GetMachinesByMachineDeployments (ctx , framework.GetMachinesByMachineDeploymentsInput {
180
181
Lister : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
@@ -200,7 +201,7 @@ var _ = Describe("e2e tests", func() {
200
201
configCluster .ControlPlaneMachineCount = pointer .Int64Ptr (1 )
201
202
configCluster .WorkerMachineCount = pointer .Int64Ptr (0 )
202
203
configCluster .Flavor = shared .FlavorDefault
203
- _ = createCluster (ctx , configCluster , specName )
204
+ _ = createCluster (ctx , configCluster )
204
205
205
206
shared .Byf ("Creating Machine Deployment with invalid subnet id" )
206
207
md1Name := clusterName + "-md-1"
@@ -243,7 +244,7 @@ var _ = Describe("e2e tests", func() {
243
244
})
244
245
})
245
246
246
- func createCluster (ctx context.Context , configCluster clusterctl.ConfigClusterInput , specName string ) []* clusterv1.MachineDeployment {
247
+ func createCluster (ctx context.Context , configCluster clusterctl.ConfigClusterInput ) []* clusterv1.MachineDeployment {
247
248
result := & clusterctl.ApplyClusterTemplateAndWaitResult {}
248
249
clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
249
250
ClusterProxy : e2eCtx .Environment .BootstrapClusterProxy ,
0 commit comments