@@ -2444,6 +2444,8 @@ func TestIsolateL4Listeners(t *testing.T) {
2444
2444
"tls_flavor" : {"flavor.example.com" },
2445
2445
}
2446
2446
2447
+ hostnamesNoSectionName := []gatewayv1.Hostname {"tea.example.com" , "coffee.example.com" , "flavor.example.com" }
2448
+
2447
2449
tests := []struct {
2448
2450
expectedResult map [string ][]ParentRef
2449
2451
listenerMap map [string ]hostPort
@@ -2462,21 +2464,21 @@ func TestIsolateL4Listeners(t *testing.T) {
2462
2464
createL4RoutewithAcceptedHostnames (
2463
2465
tlsCoffeeRoute ,
2464
2466
acceptedHostnamesNoSectionName ,
2465
- []gatewayv1. Hostname { "coffee.example.com" } ,
2467
+ hostnamesNoSectionName ,
2466
2468
nil , // no section name
2467
2469
443 ,
2468
2470
),
2469
2471
createL4RoutewithAcceptedHostnames (
2470
2472
tlsTeaRoute ,
2471
2473
acceptedHostnamesNoSectionName ,
2472
- []gatewayv1. Hostname { "tea.example.com" } ,
2474
+ hostnamesNoSectionName ,
2473
2475
nil , // no section name
2474
2476
443 ,
2475
2477
),
2476
2478
createL4RoutewithAcceptedHostnames (
2477
2479
tlsFlavorRoute ,
2478
2480
acceptedHostnamesNoSectionName ,
2479
- []gatewayv1. Hostname { "flavor.example.com" } ,
2481
+ hostnamesNoSectionName ,
2480
2482
nil , // no section name
2481
2483
443 ,
2482
2484
),
@@ -2834,6 +2836,8 @@ func TestIsolateL7Listeners(t *testing.T) {
2834
2836
"hr_flavor" : {"flavor.example.com" },
2835
2837
}
2836
2838
2839
+ hostnamesNoSectionName := []gatewayv1.Hostname {"tea.example.com" , "coffee.example.com" , "flavor.example.com" }
2840
+
2837
2841
tests := []struct {
2838
2842
expectedResult map [string ][]ParentRef
2839
2843
listenersMap map [string ]hostPort
@@ -2884,21 +2888,21 @@ func TestIsolateL7Listeners(t *testing.T) {
2884
2888
createL7RoutewithAcceptedHostnames (
2885
2889
hrCoffeeRoute ,
2886
2890
acceptedHostnamesNoSectionName ,
2887
- []gatewayv1. Hostname { "coffee.example.com" } ,
2891
+ hostnamesNoSectionName ,
2888
2892
nil , // no section name
2889
2893
80 ,
2890
2894
),
2891
2895
createL7RoutewithAcceptedHostnames (
2892
2896
hrTeaRoute ,
2893
2897
acceptedHostnamesNoSectionName ,
2894
- []gatewayv1. Hostname { "tea.example.com" } ,
2898
+ hostnamesNoSectionName ,
2895
2899
nil , // no section name
2896
2900
80 ,
2897
2901
),
2898
2902
createL7RoutewithAcceptedHostnames (
2899
2903
hrFlavorRoute ,
2900
2904
acceptedHostnamesNoSectionName ,
2901
- []gatewayv1. Hostname { "flavor.example.com" } ,
2905
+ hostnamesNoSectionName ,
2902
2906
nil , // no section name
2903
2907
80 ,
2904
2908
),
0 commit comments