Skip to content

Commit 663b32c

Browse files
authored
chore: fmt (#3610)
1 parent 300d785 commit 663b32c

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

pkg/test/cel/grpcroute_experimental_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestGRPCRequestMirrorFilterExperimental(t *testing.T) {
5555
rules []gatewayv1.GRPCRouteRule
5656
}{
5757
{
58-
name: "GRPCRoute - Invalid because both percent and fraction are specified",
58+
name: "GRPCRoute - Invalid because both percent and fraction are specified",
5959
wantErrors: []string{"Only one of percent or fraction may be specified in HTTPRequestMirrorFilter"},
6060
rules: []gatewayv1.GRPCRouteRule{{
6161
Filters: []gatewayv1.GRPCRouteFilter{{
@@ -67,15 +67,15 @@ func TestGRPCRequestMirrorFilterExperimental(t *testing.T) {
6767
},
6868
Percent: &percent,
6969
Fraction: &gatewayv1.Fraction{
70-
Numerator: 83,
70+
Numerator: 83,
7171
Denominator: &denominator,
7272
},
7373
},
7474
}},
7575
}},
7676
},
7777
{
78-
name: "GRPCRoute - Invalid fraction - numerator greater than denominator",
78+
name: "GRPCRoute - Invalid fraction - numerator greater than denominator",
7979
wantErrors: []string{"numerator must be less than or equal to denominator"},
8080
rules: []gatewayv1.GRPCRouteRule{{
8181
Filters: []gatewayv1.GRPCRouteFilter{{
@@ -86,15 +86,15 @@ func TestGRPCRequestMirrorFilterExperimental(t *testing.T) {
8686
Port: ptrTo(gatewayv1.PortNumber(8081)),
8787
},
8888
Fraction: &gatewayv1.Fraction{
89-
Numerator: 1001,
89+
Numerator: 1001,
9090
Denominator: &denominator,
9191
},
9292
},
9393
}},
9494
}},
9595
},
9696
{
97-
name: "GRPCRoute - Invalid fraction - denominator is 0",
97+
name: "GRPCRoute - Invalid fraction - denominator is 0",
9898
wantErrors: []string{"spec.rules[0].filters[0].requestMirror.fraction.denominator in body should be greater than or equal to 1"},
9999
rules: []gatewayv1.GRPCRouteRule{{
100100
Filters: []gatewayv1.GRPCRouteFilter{{
@@ -105,15 +105,15 @@ func TestGRPCRequestMirrorFilterExperimental(t *testing.T) {
105105
Port: ptrTo(gatewayv1.PortNumber(8081)),
106106
},
107107
Fraction: &gatewayv1.Fraction{
108-
Numerator: 0,
108+
Numerator: 0,
109109
Denominator: &bad_denominator,
110110
},
111111
},
112112
}},
113113
}},
114114
},
115115
{
116-
name: "GRPCRoute - Invalid fraction - numerator is negative",
116+
name: "GRPCRoute - Invalid fraction - numerator is negative",
117117
wantErrors: []string{"spec.rules[0].filters[0].requestMirror.fraction.numerator in body should be greater than or equal to 0"},
118118
rules: []gatewayv1.GRPCRouteRule{{
119119
Filters: []gatewayv1.GRPCRouteFilter{{
@@ -124,7 +124,7 @@ func TestGRPCRequestMirrorFilterExperimental(t *testing.T) {
124124
Port: ptrTo(gatewayv1.PortNumber(8081)),
125125
},
126126
Fraction: &gatewayv1.Fraction{
127-
Numerator: -1,
127+
Numerator: -1,
128128
Denominator: &denominator,
129129
},
130130
},
@@ -157,7 +157,7 @@ func TestGRPCRequestMirrorFilterExperimental(t *testing.T) {
157157
Port: ptrTo(gatewayv1.PortNumber(8081)),
158158
},
159159
Fraction: &gatewayv1.Fraction{
160-
Numerator: 83,
160+
Numerator: 83,
161161
Denominator: &denominator,
162162
},
163163
},

pkg/test/cel/httproute_experimental_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
444444
rules []gatewayv1.HTTPRouteRule
445445
}{
446446
{
447-
name: "HTTPRoute - Invalid because both percent and fraction are specified",
447+
name: "HTTPRoute - Invalid because both percent and fraction are specified",
448448
wantErrors: []string{"Only one of percent or fraction may be specified in HTTPRequestMirrorFilter"},
449449
rules: []gatewayv1.HTTPRouteRule{{
450450
Filters: []gatewayv1.HTTPRouteFilter{{
@@ -456,15 +456,15 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
456456
},
457457
Percent: &percent,
458458
Fraction: &gatewayv1.Fraction{
459-
Numerator: 83,
459+
Numerator: 83,
460460
Denominator: &denominator,
461461
},
462462
},
463463
}},
464464
}},
465465
},
466466
{
467-
name: "HTTPRoute - Invalid fraction - numerator greater than denominator",
467+
name: "HTTPRoute - Invalid fraction - numerator greater than denominator",
468468
wantErrors: []string{"numerator must be less than or equal to denominator"},
469469
rules: []gatewayv1.HTTPRouteRule{{
470470
Filters: []gatewayv1.HTTPRouteFilter{{
@@ -475,15 +475,15 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
475475
Port: ptrTo(gatewayv1.PortNumber(8081)),
476476
},
477477
Fraction: &gatewayv1.Fraction{
478-
Numerator: 1001,
478+
Numerator: 1001,
479479
Denominator: &denominator,
480480
},
481481
},
482482
}},
483483
}},
484484
},
485485
{
486-
name: "HTTPRoute - Invalid fraction - denominator is 0",
486+
name: "HTTPRoute - Invalid fraction - denominator is 0",
487487
wantErrors: []string{"spec.rules[0].filters[0].requestMirror.fraction.denominator in body should be greater than or equal to 1"},
488488
rules: []gatewayv1.HTTPRouteRule{{
489489
Filters: []gatewayv1.HTTPRouteFilter{{
@@ -494,15 +494,15 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
494494
Port: ptrTo(gatewayv1.PortNumber(8081)),
495495
},
496496
Fraction: &gatewayv1.Fraction{
497-
Numerator: 0,
497+
Numerator: 0,
498498
Denominator: &bad_denominator,
499499
},
500500
},
501501
}},
502502
}},
503503
},
504504
{
505-
name: "HTTPRoute - Invalid fraction - numerator is negative",
505+
name: "HTTPRoute - Invalid fraction - numerator is negative",
506506
wantErrors: []string{"spec.rules[0].filters[0].requestMirror.fraction.numerator in body should be greater than or equal to 0"},
507507
rules: []gatewayv1.HTTPRouteRule{{
508508
Filters: []gatewayv1.HTTPRouteFilter{{
@@ -513,7 +513,7 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
513513
Port: ptrTo(gatewayv1.PortNumber(8081)),
514514
},
515515
Fraction: &gatewayv1.Fraction{
516-
Numerator: -1,
516+
Numerator: -1,
517517
Denominator: &denominator,
518518
},
519519
},
@@ -546,7 +546,7 @@ func TestHTTPRequestMirrorFilterExperimental(t *testing.T) {
546546
Port: ptrTo(gatewayv1.PortNumber(8081)),
547547
},
548548
Fraction: &gatewayv1.Fraction{
549-
Numerator: 83,
549+
Numerator: 83,
550550
Denominator: &denominator,
551551
},
552552
},

0 commit comments

Comments
 (0)