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