@@ -2444,6 +2444,8 @@ func TestIsolateL4Listeners(t *testing.T) {
24442444 "tls_flavor" : {"flavor.example.com" },
24452445 }
24462446
2447+ hostnamesNoSectionName := []gatewayv1.Hostname {"tea.example.com" , "coffee.example.com" , "flavor.example.com" }
2448+
24472449 tests := []struct {
24482450 expectedResult map [string ][]ParentRef
24492451 listenerMap map [string ]hostPort
@@ -2462,21 +2464,21 @@ func TestIsolateL4Listeners(t *testing.T) {
24622464 createL4RoutewithAcceptedHostnames (
24632465 tlsCoffeeRoute ,
24642466 acceptedHostnamesNoSectionName ,
2465- []gatewayv1. Hostname { "coffee.example.com" } ,
2467+ hostnamesNoSectionName ,
24662468 nil , // no section name
24672469 443 ,
24682470 ),
24692471 createL4RoutewithAcceptedHostnames (
24702472 tlsTeaRoute ,
24712473 acceptedHostnamesNoSectionName ,
2472- []gatewayv1. Hostname { "tea.example.com" } ,
2474+ hostnamesNoSectionName ,
24732475 nil , // no section name
24742476 443 ,
24752477 ),
24762478 createL4RoutewithAcceptedHostnames (
24772479 tlsFlavorRoute ,
24782480 acceptedHostnamesNoSectionName ,
2479- []gatewayv1. Hostname { "flavor.example.com" } ,
2481+ hostnamesNoSectionName ,
24802482 nil , // no section name
24812483 443 ,
24822484 ),
@@ -2834,6 +2836,8 @@ func TestIsolateL7Listeners(t *testing.T) {
28342836 "hr_flavor" : {"flavor.example.com" },
28352837 }
28362838
2839+ hostnamesNoSectionName := []gatewayv1.Hostname {"tea.example.com" , "coffee.example.com" , "flavor.example.com" }
2840+
28372841 tests := []struct {
28382842 expectedResult map [string ][]ParentRef
28392843 listenersMap map [string ]hostPort
@@ -2884,21 +2888,21 @@ func TestIsolateL7Listeners(t *testing.T) {
28842888 createL7RoutewithAcceptedHostnames (
28852889 hrCoffeeRoute ,
28862890 acceptedHostnamesNoSectionName ,
2887- []gatewayv1. Hostname { "coffee.example.com" } ,
2891+ hostnamesNoSectionName ,
28882892 nil , // no section name
28892893 80 ,
28902894 ),
28912895 createL7RoutewithAcceptedHostnames (
28922896 hrTeaRoute ,
28932897 acceptedHostnamesNoSectionName ,
2894- []gatewayv1. Hostname { "tea.example.com" } ,
2898+ hostnamesNoSectionName ,
28952899 nil , // no section name
28962900 80 ,
28972901 ),
28982902 createL7RoutewithAcceptedHostnames (
28992903 hrFlavorRoute ,
29002904 acceptedHostnamesNoSectionName ,
2901- []gatewayv1. Hostname { "flavor.example.com" } ,
2905+ hostnamesNoSectionName ,
29022906 nil , // no section name
29032907 80 ,
29042908 ),
0 commit comments