@@ -444,7 +444,7 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
444
444
rules []gatewayv1.HTTPRouteRule
445
445
}{
446
446
{
447
- name : "HTTPRoute - Invalid because both percent and fraction are specified" ,
447
+ name : "HTTPRoute - Invalid because both percent and fraction are specified" ,
448
448
wantErrors : []string {"Only one of percent or fraction may be specified in HTTPRequestMirrorFilter" },
449
449
rules : []gatewayv1.HTTPRouteRule {{
450
450
Filters : []gatewayv1.HTTPRouteFilter {{
@@ -456,15 +456,15 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
456
456
},
457
457
Percent : & percent ,
458
458
Fraction : & gatewayv1.Fraction {
459
- Numerator : 83 ,
459
+ Numerator : 83 ,
460
460
Denominator : & denominator ,
461
461
},
462
462
},
463
463
}},
464
464
}},
465
465
},
466
466
{
467
- name : "HTTPRoute - Invalid fraction - numerator greater than denominator" ,
467
+ name : "HTTPRoute - Invalid fraction - numerator greater than denominator" ,
468
468
wantErrors : []string {"numerator must be less than or equal to denominator" },
469
469
rules : []gatewayv1.HTTPRouteRule {{
470
470
Filters : []gatewayv1.HTTPRouteFilter {{
@@ -475,15 +475,15 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
475
475
Port : ptrTo (gatewayv1 .PortNumber (8081 )),
476
476
},
477
477
Fraction : & gatewayv1.Fraction {
478
- Numerator : 1001 ,
478
+ Numerator : 1001 ,
479
479
Denominator : & denominator ,
480
480
},
481
481
},
482
482
}},
483
483
}},
484
484
},
485
485
{
486
- name : "HTTPRoute - Invalid fraction - denominator is 0" ,
486
+ name : "HTTPRoute - Invalid fraction - denominator is 0" ,
487
487
wantErrors : []string {"spec.rules[0].filters[0].requestMirror.fraction.denominator in body should be greater than or equal to 1" },
488
488
rules : []gatewayv1.HTTPRouteRule {{
489
489
Filters : []gatewayv1.HTTPRouteFilter {{
@@ -494,15 +494,15 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
494
494
Port : ptrTo (gatewayv1 .PortNumber (8081 )),
495
495
},
496
496
Fraction : & gatewayv1.Fraction {
497
- Numerator : 0 ,
497
+ Numerator : 0 ,
498
498
Denominator : & bad_denominator ,
499
499
},
500
500
},
501
501
}},
502
502
}},
503
503
},
504
504
{
505
- name : "HTTPRoute - Invalid fraction - numerator is negative" ,
505
+ name : "HTTPRoute - Invalid fraction - numerator is negative" ,
506
506
wantErrors : []string {"spec.rules[0].filters[0].requestMirror.fraction.numerator in body should be greater than or equal to 0" },
507
507
rules : []gatewayv1.HTTPRouteRule {{
508
508
Filters : []gatewayv1.HTTPRouteFilter {{
@@ -513,7 +513,7 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
513
513
Port : ptrTo (gatewayv1 .PortNumber (8081 )),
514
514
},
515
515
Fraction : & gatewayv1.Fraction {
516
- Numerator : - 1 ,
516
+ Numerator : - 1 ,
517
517
Denominator : & denominator ,
518
518
},
519
519
},
@@ -546,7 +546,7 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
546
546
Port : ptrTo (gatewayv1 .PortNumber (8081 )),
547
547
},
548
548
Fraction : & gatewayv1.Fraction {
549
- Numerator : 83 ,
549
+ Numerator : 83 ,
550
550
Denominator : & denominator ,
551
551
},
552
552
},
0 commit comments