@@ -38,7 +38,7 @@ var _ = Describe("Service [Slow]", func() {
38
38
f := sharedfw .NewDefaultFramework (baseName )
39
39
40
40
basicTestArray := []struct {
41
- lbType string
41
+ lbType string
42
42
CreationAnnotations map [string ]string
43
43
}{
44
44
{
@@ -48,7 +48,7 @@ var _ = Describe("Service [Slow]", func() {
48
48
{
49
49
"nlb" ,
50
50
map [string ]string {
51
- cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
51
+ cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
52
52
cloudprovider .ServiceAnnotationNetworkLoadBalancerSecurityListManagementMode : "All" ,
53
53
},
54
54
},
@@ -57,7 +57,7 @@ var _ = Describe("Service [Slow]", func() {
57
57
It ("should be possible to create and mutate a Service type:LoadBalancer (change nodeport) [Canary]" , func () {
58
58
for _ , test := range basicTestArray {
59
59
By ("Running test for: " + test .lbType )
60
- serviceName := "basic-" + test .lbType + "-test"
60
+ serviceName := "basic-" + test .lbType + "-test"
61
61
ns := f .Namespace .Name
62
62
63
63
jig := sharedfw .NewServiceTestJig (f .ClientSet , serviceName )
@@ -212,7 +212,7 @@ var _ = Describe("ESIPP [Slow]", func() {
212
212
cs = f .ClientSet
213
213
})
214
214
esippTestsArray := []struct {
215
- lbType string
215
+ lbType string
216
216
CreationAnnotations map [string ]string
217
217
}{
218
218
{
@@ -222,7 +222,7 @@ var _ = Describe("ESIPP [Slow]", func() {
222
222
{
223
223
"nlb" ,
224
224
map [string ]string {
225
- cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
225
+ cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
226
226
cloudprovider .ServiceAnnotationNetworkLoadBalancerSecurityListManagementMode : "All" ,
227
227
},
228
228
},
@@ -232,7 +232,7 @@ var _ = Describe("ESIPP [Slow]", func() {
232
232
for _ , test := range esippTestsArray {
233
233
By ("Running test for: " + test .lbType )
234
234
namespace := f .Namespace .Name
235
- serviceName := "external-local-" + test .lbType
235
+ serviceName := "external-local-" + test .lbType
236
236
jig := sharedfw .NewServiceTestJig (cs , serviceName )
237
237
nodes := jig .GetNodes (sharedfw .MaxNodesForEndpointsTests )
238
238
@@ -293,11 +293,11 @@ var _ = Describe("ESIPP [Slow]", func() {
293
293
for _ , test := range esippTestsArray {
294
294
By ("Running test for: " + test .lbType )
295
295
namespace := f .Namespace .Name
296
- serviceName := "external-local-" + test .lbType
296
+ serviceName := "external-local-" + test .lbType
297
297
jig := sharedfw .NewServiceTestJig (cs , serviceName )
298
298
nodes := jig .GetNodes (sharedfw .MaxNodesForEndpointsTests )
299
299
300
- svc := jig .CreateOnlyLocalLoadBalancerService (namespace , serviceName , loadBalancerCreateTimeout , true , test .CreationAnnotations ,nil )
300
+ svc := jig .CreateOnlyLocalLoadBalancerService (namespace , serviceName , loadBalancerCreateTimeout , true , test .CreationAnnotations , nil )
301
301
serviceLBNames = append (serviceLBNames , cloudprovider .GetLoadBalancerName (svc ))
302
302
defer func () {
303
303
jig .ChangeServiceType (svc .Namespace , svc .Name , v1 .ServiceTypeClusterIP , loadBalancerCreateTimeout )
@@ -683,12 +683,12 @@ var _ = Describe("LB Properties", func() {
683
683
Context ("[cloudprovider][ccm][lb]" , func () {
684
684
685
685
healthCheckTestArray := []struct {
686
- lbType string
686
+ lbType string
687
687
CreationAnnotations map [string ]string
688
- UpdatedAnnotations map [string ]string
689
- RemovedAnnotations map [string ]string
690
- CreateInterval int
691
- UpdateInterval int
688
+ UpdatedAnnotations map [string ]string
689
+ RemovedAnnotations map [string ]string
690
+ CreateInterval int
691
+ UpdateInterval int
692
692
}{
693
693
{
694
694
"lb" ,
@@ -712,13 +712,13 @@ var _ = Describe("LB Properties", func() {
712
712
cloudprovider .ServiceAnnotationNetworkLoadBalancerHealthCheckRetries : "1" ,
713
713
cloudprovider .ServiceAnnotationNetworkLoadBalancerHealthCheckTimeout : "1000" ,
714
714
cloudprovider .ServiceAnnotationNetworkLoadBalancerHealthCheckInterval : "10000" ,
715
- cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
715
+ cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
716
716
},
717
717
map [string ]string {
718
718
cloudprovider .ServiceAnnotationNetworkLoadBalancerHealthCheckRetries : "2" ,
719
719
cloudprovider .ServiceAnnotationNetworkLoadBalancerHealthCheckTimeout : "2000" ,
720
720
cloudprovider .ServiceAnnotationNetworkLoadBalancerHealthCheckInterval : "15000" ,
721
- cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
721
+ cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
722
722
},
723
723
map [string ]string {
724
724
cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
@@ -730,7 +730,7 @@ var _ = Describe("LB Properties", func() {
730
730
It ("should be possible to create Service type:LoadBalancer and mutate health-check config" , func () {
731
731
for _ , test := range healthCheckTestArray {
732
732
By ("Running test for: " + test .lbType )
733
- serviceName := "e2e-" + test .lbType + "-healthcheck-config"
733
+ serviceName := "e2e-" + test .lbType + "-healthcheck-config"
734
734
ns := f .Namespace .Name
735
735
736
736
jig := sharedfw .NewServiceTestJig (f .ClientSet , serviceName )
@@ -1041,33 +1041,33 @@ var _ = Describe("LB Properties", func() {
1041
1041
1042
1042
})
1043
1043
1044
- nsgTestArray := []struct {
1045
- lbtype string
1046
- Annotations map [string ]string
1044
+ nsgTestArray := []struct {
1045
+ lbtype string
1046
+ Annotations map [string ]string
1047
1047
nsgAnnotation string
1048
1048
}{
1049
1049
{
1050
1050
"lb" ,
1051
1051
map [string ]string {
1052
- cloudprovider .ServiceAnnotationLoadBalancerInternal : "true" ,
1053
- cloudprovider .ServiceAnnotationLoadBalancerShape : "10Mbps" ,
1052
+ cloudprovider .ServiceAnnotationLoadBalancerInternal : "true" ,
1053
+ cloudprovider .ServiceAnnotationLoadBalancerShape : "10Mbps" ,
1054
1054
},
1055
1055
cloudprovider .ServiceAnnotationLoadBalancerNetworkSecurityGroups ,
1056
1056
},
1057
1057
{
1058
1058
"nlb" ,
1059
1059
map [string ]string {
1060
- cloudprovider .ServiceAnnotationLoadBalancerInternal : "true" ,
1061
- cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
1060
+ cloudprovider .ServiceAnnotationLoadBalancerInternal : "true" ,
1061
+ cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
1062
1062
},
1063
1063
cloudprovider .ServiceAnnotationNetworkLoadBalancerNetworkSecurityGroups ,
1064
1064
},
1065
1065
}
1066
1066
// Test NSG feature
1067
1067
It ("should be possible to create/update/delete Service type:LoadBalancer with NSGs config" , func () {
1068
1068
for _ , test := range nsgTestArray {
1069
- By ("Running test for: " + test .lbtype )
1070
- serviceName := "e2e-" + test .lbtype + "-nsg"
1069
+ By ("Running test for: " + test .lbtype )
1070
+ serviceName := "e2e-" + test .lbtype + "-nsg"
1071
1071
ns := f .Namespace .Name
1072
1072
1073
1073
jig := sharedfw .NewServiceTestJig (f .ClientSet , serviceName )
@@ -1170,10 +1170,10 @@ var _ = Describe("LB Properties", func() {
1170
1170
})
1171
1171
1172
1172
lbPolicyTestArray := []struct {
1173
- lbType string
1173
+ lbType string
1174
1174
CreationAnnotations map [string ]string
1175
- UpdatedAnnotations map [string ]string
1176
- PolicyAnnotation string
1175
+ UpdatedAnnotations map [string ]string
1176
+ PolicyAnnotation string
1177
1177
}{
1178
1178
{
1179
1179
"lb" ,
@@ -1189,12 +1189,12 @@ var _ = Describe("LB Properties", func() {
1189
1189
{
1190
1190
"nlb" ,
1191
1191
map [string ]string {
1192
- cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
1192
+ cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
1193
1193
cloudprovider .ServiceAnnotationNetworkLoadBalancerBackendPolicy : cloudprovider .NetworkLoadBalancingPolicyTwoTuple ,
1194
1194
},
1195
1195
map [string ]string {
1196
- cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
1197
- cloudprovider .ServiceAnnotationNetworkLoadBalancerBackendPolicy : cloudprovider .NetworkLoadBalancingPolicyThreeTuple ,
1196
+ cloudprovider .ServiceAnnotationLoadBalancerType : "nlb" ,
1197
+ cloudprovider .ServiceAnnotationNetworkLoadBalancerBackendPolicy : cloudprovider .NetworkLoadBalancingPolicyThreeTuple ,
1198
1198
},
1199
1199
cloudprovider .ServiceAnnotationNetworkLoadBalancerBackendPolicy ,
1200
1200
},
@@ -1206,7 +1206,7 @@ var _ = Describe("LB Properties", func() {
1206
1206
for _ , test := range lbPolicyTestArray {
1207
1207
By ("Running test for: " + test .lbType )
1208
1208
1209
- serviceName := "e2e-" + test .lbType + "-policy"
1209
+ serviceName := "e2e-" + test .lbType + "-policy"
1210
1210
ns := f .Namespace .Name
1211
1211
1212
1212
jig := sharedfw .NewServiceTestJig (f .ClientSet , serviceName )
@@ -1281,8 +1281,8 @@ var _ = Describe("LB Properties", func() {
1281
1281
}
1282
1282
})
1283
1283
1284
- reservedIpTestArray := []struct {
1285
- lbtype string
1284
+ reservedIpTestArray := []struct {
1285
+ lbtype string
1286
1286
CreationAnnotations map [string ]string
1287
1287
}{
1288
1288
{
@@ -1301,8 +1301,8 @@ var _ = Describe("LB Properties", func() {
1301
1301
//Test Reserved IP feature
1302
1302
It ("should be possible to create Service type:LoadbBalancer with public reservedIP" , func () {
1303
1303
for _ , test := range reservedIpTestArray {
1304
- By ("Running test for: " + test .lbtype )
1305
- serviceName := "e2e-" + test .lbtype + "-reserved-ip"
1304
+ By ("Running test for: " + test .lbtype )
1305
+ serviceName := "e2e-" + test .lbtype + "-reserved-ip"
1306
1306
ns := f .Namespace .Name
1307
1307
1308
1308
jig := sharedfw .NewServiceTestJig (f .ClientSet , serviceName )
@@ -1381,10 +1381,10 @@ func CreateHealthCheckScript(healthCheckNodePort int, ips []string, path string,
1381
1381
port := strconv .Itoa (healthCheckNodePort )
1382
1382
ipPort := net .JoinHostPort (privateIP , port )
1383
1383
//command to get health status of the pod on the node
1384
- script += "healthCheckPassed=$(curl -s http://" + ipPort + path + " | grep -i localEndpoints* | cut -d ':' -f2);"
1385
- if n == nodeIndex {
1384
+ script += "healthCheckPassed=$(curl -s http://" + ipPort + path + " | grep -i localEndpoints* | cut -d ':' -f2);"
1385
+ if n == nodeIndex {
1386
1386
script += "if ((\" $healthCheckPassed\" ==\" 0\" )); then exit 1; fi;"
1387
- }else {
1387
+ } else {
1388
1388
script += "if ((\" $healthCheckPassed\" ==\" 1\" )); then exit 1; fi;"
1389
1389
}
1390
1390
}
0 commit comments