@@ -213,7 +213,7 @@ func TestCreateUpstreams(t *testing.T) {
213213 Address : "10.0.0.2:80" ,
214214 },
215215 },
216- LoadBalancingMethod : randomTwoLeastConnLB ,
216+ LoadBalancingMethod : defaultLBMethod ,
217217 },
218218 {
219219 Name : "up2" ,
@@ -223,7 +223,7 @@ func TestCreateUpstreams(t *testing.T) {
223223 Address : "11.0.0.0:80" ,
224224 },
225225 },
226- LoadBalancingMethod : randomTwoLeastConnLB ,
226+ LoadBalancingMethod : defaultLBMethod ,
227227 },
228228 {
229229 Name : "up3" ,
@@ -242,7 +242,7 @@ func TestCreateUpstreams(t *testing.T) {
242242 Address : "[fd00:10:244:1::7]:80" ,
243243 },
244244 },
245- LoadBalancingMethod : randomTwoLeastConnLB ,
245+ LoadBalancingMethod : defaultLBMethod ,
246246 },
247247 {
248248 Name : "up5-usp" ,
@@ -347,7 +347,7 @@ func TestCreateUpstream(t *testing.T) {
347347 Address : "10.0.0.3:80" ,
348348 },
349349 },
350- LoadBalancingMethod : randomTwoLeastConnLB ,
350+ LoadBalancingMethod : defaultLBMethod ,
351351 },
352352 msg : "multiple endpoints" ,
353353 },
@@ -370,7 +370,7 @@ func TestCreateUpstream(t *testing.T) {
370370 Address : "[fd00:10:244:1::7]:80" ,
371371 },
372372 },
373- LoadBalancingMethod : randomTwoLeastConnLB ,
373+ LoadBalancingMethod : defaultLBMethod ,
374374 },
375375 msg : "endpoint ipv6" ,
376376 },
@@ -502,7 +502,7 @@ func TestCreateUpstream(t *testing.T) {
502502 Address : "10.0.0.1:80" ,
503503 },
504504 },
505- LoadBalancingMethod : randomTwoLeastConnLB ,
505+ LoadBalancingMethod : defaultLBMethod ,
506506 },
507507 msg : "empty upstreamSettingsPolicies" ,
508508 },
@@ -546,7 +546,7 @@ func TestCreateUpstream(t *testing.T) {
546546 Time : "5s" ,
547547 Timeout : "10s" ,
548548 },
549- LoadBalancingMethod : randomTwoLeastConnLB ,
549+ LoadBalancingMethod : defaultLBMethod ,
550550 },
551551 msg : "upstreamSettingsPolicy with only keep alive settings" ,
552552 },
@@ -603,7 +603,7 @@ func TestCreateUpstream(t *testing.T) {
603603 Resolve : true ,
604604 },
605605 },
606- LoadBalancingMethod : randomTwoLeastConnLB ,
606+ LoadBalancingMethod : defaultLBMethod ,
607607 },
608608 msg : "ExternalName service with DNS name" ,
609609 },
@@ -642,7 +642,7 @@ func TestCreateUpstream(t *testing.T) {
642642 Address : "[fd00:10:244:1::7]:80" ,
643643 },
644644 },
645- LoadBalancingMethod : randomTwoLeastConnLB ,
645+ LoadBalancingMethod : defaultLBMethod ,
646646 },
647647 msg : "mixed IP addresses and DNS names" ,
648648 },
@@ -663,9 +663,9 @@ func TestCreateUpstreamPlus(t *testing.T) {
663663 gen := GeneratorImpl {plus : true }
664664
665665 tests := []struct {
666+ expectedUpstream http.Upstream
666667 msg string
667668 stateUpstream dataplane.Upstream
668- expectedUpstream http.Upstream
669669 }{
670670 {
671671 msg : "with endpoints" ,
@@ -687,7 +687,7 @@ func TestCreateUpstreamPlus(t *testing.T) {
687687 Address : "10.0.0.1:80" ,
688688 },
689689 },
690- LoadBalancingMethod : randomTwoLeastConnLB ,
690+ LoadBalancingMethod : defaultLBMethod ,
691691 },
692692 },
693693 {
0 commit comments