@@ -109,6 +109,7 @@ func createFakePolicy(name string, kind string) policies.Policy {
109
109
}
110
110
111
111
func TestBuildConfiguration (t * testing.T ) {
112
+ t .Parallel ()
112
113
const (
113
114
invalidMatchesPath = "/not-valid-matches"
114
115
invalidFiltersPath = "/not-valid-filters"
@@ -2231,6 +2232,7 @@ func TestBuildConfiguration(t *testing.T) {
2231
2232
2232
2233
for _ , test := range tests {
2233
2234
t .Run (test .msg , func (t * testing.T ) {
2235
+ t .Parallel ()
2234
2236
g := NewWithT (t )
2235
2237
2236
2238
result := BuildConfiguration (
@@ -2255,6 +2257,7 @@ func TestBuildConfiguration(t *testing.T) {
2255
2257
}
2256
2258
2257
2259
func TestGetPath (t * testing.T ) {
2260
+ t .Parallel ()
2258
2261
tests := []struct {
2259
2262
path * v1.HTTPPathMatch
2260
2263
expected string
@@ -2284,6 +2287,7 @@ func TestGetPath(t *testing.T) {
2284
2287
2285
2288
for _ , test := range tests {
2286
2289
t .Run (test .msg , func (t * testing.T ) {
2290
+ t .Parallel ()
2287
2291
g := NewWithT (t )
2288
2292
result := getPath (test .path )
2289
2293
g .Expect (result ).To (Equal (test .expected ))
@@ -2292,6 +2296,7 @@ func TestGetPath(t *testing.T) {
2292
2296
}
2293
2297
2294
2298
func TestCreateFilters (t * testing.T ) {
2299
+ t .Parallel ()
2295
2300
redirect1 := v1.HTTPRouteFilter {
2296
2301
Type : v1 .HTTPRouteFilterRequestRedirect ,
2297
2302
RequestRedirect : & v1.HTTPRequestRedirectFilter {
@@ -2451,6 +2456,7 @@ func TestCreateFilters(t *testing.T) {
2451
2456
2452
2457
for _ , test := range tests {
2453
2458
t .Run (test .msg , func (t * testing.T ) {
2459
+ t .Parallel ()
2454
2460
g := NewWithT (t )
2455
2461
result := createHTTPFilters (test .filters )
2456
2462
@@ -2460,6 +2466,7 @@ func TestCreateFilters(t *testing.T) {
2460
2466
}
2461
2467
2462
2468
func TestGetListenerHostname (t * testing.T ) {
2469
+ t .Parallel ()
2463
2470
var emptyHostname v1.Hostname
2464
2471
var hostname v1.Hostname = "example.com"
2465
2472
@@ -2487,6 +2494,7 @@ func TestGetListenerHostname(t *testing.T) {
2487
2494
2488
2495
for _ , test := range tests {
2489
2496
t .Run (test .msg , func (t * testing.T ) {
2497
+ t .Parallel ()
2490
2498
g := NewWithT (t )
2491
2499
result := getListenerHostname (test .hostname )
2492
2500
g .Expect (result ).To (Equal (test .expected ))
@@ -2509,6 +2517,7 @@ func refsToValidRules(refs ...[]graph.BackendRef) []graph.RouteRule {
2509
2517
}
2510
2518
2511
2519
func TestBuildUpstreams (t * testing.T ) {
2520
+ t .Parallel ()
2512
2521
fooEndpoints := []resolver.Endpoint {
2513
2522
{
2514
2523
Address : "10.0.0.0" ,
@@ -2776,6 +2785,7 @@ func TestBuildUpstreams(t *testing.T) {
2776
2785
}
2777
2786
2778
2787
func TestBuildBackendGroups (t * testing.T ) {
2788
+ t .Parallel ()
2779
2789
createBackendGroup := func (name string , ruleIdx int , backendNames ... string ) BackendGroup {
2780
2790
backends := make ([]Backend , len (backendNames ))
2781
2791
for i , name := range backendNames {
@@ -2848,6 +2858,7 @@ func TestBuildBackendGroups(t *testing.T) {
2848
2858
}
2849
2859
2850
2860
func TestHostnameMoreSpecific (t * testing.T ) {
2861
+ t .Parallel ()
2851
2862
tests := []struct {
2852
2863
host1 * v1.Hostname
2853
2864
host2 * v1.Hostname
@@ -2900,6 +2911,7 @@ func TestHostnameMoreSpecific(t *testing.T) {
2900
2911
2901
2912
for _ , tc := range tests {
2902
2913
t .Run (tc .msg , func (t * testing.T ) {
2914
+ t .Parallel ()
2903
2915
g := NewWithT (t )
2904
2916
2905
2917
g .Expect (listenerHostnameMoreSpecific (tc .host1 , tc .host2 )).To (Equal (tc .host1Wins ))
@@ -2908,6 +2920,7 @@ func TestHostnameMoreSpecific(t *testing.T) {
2908
2920
}
2909
2921
2910
2922
func TestConvertBackendTLS (t * testing.T ) {
2923
+ t .Parallel ()
2911
2924
btpCaCertRefs := & graph.BackendTLSPolicy {
2912
2925
Source : & v1alpha3.BackendTLSPolicy {
2913
2926
ObjectMeta : metav1.ObjectMeta {
@@ -2976,6 +2989,7 @@ func TestConvertBackendTLS(t *testing.T) {
2976
2989
2977
2990
for _ , tc := range tests {
2978
2991
t .Run (tc .msg , func (t * testing.T ) {
2992
+ t .Parallel ()
2979
2993
g := NewWithT (t )
2980
2994
2981
2995
g .Expect (convertBackendTLS (tc .btp )).To (Equal (tc .expected ))
@@ -2984,6 +2998,7 @@ func TestConvertBackendTLS(t *testing.T) {
2984
2998
}
2985
2999
2986
3000
func TestBuildTelemetry (t * testing.T ) {
3001
+ t .Parallel ()
2987
3002
telemetryConfigured := & graph.NginxProxy {
2988
3003
Source : & ngfAPI.NginxProxy {
2989
3004
Spec : ngfAPI.NginxProxySpec {
@@ -3206,6 +3221,7 @@ func TestBuildTelemetry(t *testing.T) {
3206
3221
3207
3222
for _ , tc := range tests {
3208
3223
t .Run (tc .msg , func (t * testing.T ) {
3224
+ t .Parallel ()
3209
3225
g := NewWithT (t )
3210
3226
tel := buildTelemetry (tc .g )
3211
3227
sort .Slice (tel .Ratios , func (i , j int ) bool {
@@ -3217,6 +3233,7 @@ func TestBuildTelemetry(t *testing.T) {
3217
3233
}
3218
3234
3219
3235
func TestBuildPolicies (t * testing.T ) {
3236
+ t .Parallel ()
3220
3237
getPolicy := func (kind , name string ) policies.Policy {
3221
3238
return & policiesfakes.FakePolicy {
3222
3239
GetNameStub : func () string {
@@ -3281,6 +3298,7 @@ func TestBuildPolicies(t *testing.T) {
3281
3298
3282
3299
for _ , test := range tests {
3283
3300
t .Run (test .name , func (t * testing.T ) {
3301
+ t .Parallel ()
3284
3302
g := NewWithT (t )
3285
3303
3286
3304
pols := buildPolicies (test .policies )
@@ -3293,6 +3311,7 @@ func TestBuildPolicies(t *testing.T) {
3293
3311
}
3294
3312
3295
3313
func TestGetAllowedAddressType (t * testing.T ) {
3314
+ t .Parallel ()
3296
3315
test := []struct {
3297
3316
msg string
3298
3317
ipFamily IPFamilyType
@@ -3322,18 +3341,21 @@ func TestGetAllowedAddressType(t *testing.T) {
3322
3341
3323
3342
for _ , tc := range test {
3324
3343
t .Run (tc .msg , func (t * testing.T ) {
3344
+ t .Parallel ()
3325
3345
g := NewWithT (t )
3326
3346
g .Expect (getAllowedAddressType (tc .ipFamily )).To (Equal (tc .expected ))
3327
3347
})
3328
3348
}
3329
3349
}
3330
3350
3331
3351
func TestCreateRatioVarName (t * testing.T ) {
3352
+ t .Parallel ()
3332
3353
g := NewWithT (t )
3333
3354
g .Expect (CreateRatioVarName (25 )).To (Equal ("$otel_ratio_25" ))
3334
3355
}
3335
3356
3336
3357
func TestCreatePassthroughServers (t * testing.T ) {
3358
+ t .Parallel ()
3337
3359
getL4RouteKey := func (name string ) graph.L4RouteKey {
3338
3360
return graph.L4RouteKey {
3339
3361
NamespacedName : types.NamespacedName {
@@ -3470,6 +3492,7 @@ func TestCreatePassthroughServers(t *testing.T) {
3470
3492
}
3471
3493
3472
3494
func TestBuildStreamUpstreams (t * testing.T ) {
3495
+ t .Parallel ()
3473
3496
getL4RouteKey := func (name string ) graph.L4RouteKey {
3474
3497
return graph.L4RouteKey {
3475
3498
NamespacedName : types.NamespacedName {
@@ -3601,6 +3624,7 @@ func TestBuildStreamUpstreams(t *testing.T) {
3601
3624
}
3602
3625
3603
3626
func TestBuildRewriteIPSettings (t * testing.T ) {
3627
+ t .Parallel ()
3604
3628
tests := []struct {
3605
3629
msg string
3606
3630
g * graph.Graph
@@ -3713,6 +3737,7 @@ func TestBuildRewriteIPSettings(t *testing.T) {
3713
3737
3714
3738
for _ , tc := range tests {
3715
3739
t .Run (tc .msg , func (t * testing.T ) {
3740
+ t .Parallel ()
3716
3741
g := NewWithT (t )
3717
3742
baseConfig := buildBaseHTTPConfig (tc .g )
3718
3743
g .Expect (baseConfig .RewriteClientIPSettings ).To (Equal (tc .expRewriteIPSettings ))
0 commit comments