@@ -776,32 +776,6 @@ func TestBuildGraph(t *testing.T) {
776776 Attachable : true ,
777777 Source : tr ,
778778 ParentRefs : []ParentRef {
779- {
780- Idx : 0 ,
781- Gateway : & ParentRefGateway {
782- NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
783- EffectiveNginxProxy : np1Effective ,
784- },
785- Attachment : & ParentRefAttachmentStatus {
786- AcceptedHostnames : map [string ][]string {},
787- Attached : false ,
788- FailedConditions : []conditions.Condition {conditions .NewRouteNotAllowedByListeners ()},
789- },
790- SectionName : & gw1 .Source .Spec .Listeners [0 ].Name ,
791- },
792- {
793- Idx : 0 ,
794- Gateway : & ParentRefGateway {
795- NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
796- EffectiveNginxProxy : np1Effective ,
797- },
798- Attachment : & ParentRefAttachmentStatus {
799- AcceptedHostnames : map [string ][]string {},
800- Attached : false ,
801- FailedConditions : []conditions.Condition {conditions .NewRouteNotAllowedByListeners ()},
802- },
803- SectionName : & gw1 .Source .Spec .Listeners [1 ].Name ,
804- },
805779 {
806780 Idx : 0 ,
807781 Gateway : & ParentRefGateway {
@@ -815,26 +789,13 @@ func TestBuildGraph(t *testing.T) {
815789 client .ObjectKeyFromObject (gw1 .Source ),
816790 "listener-443-2" ,
817791 ): {"fizz.example.org" },
818- },
819- },
820- SectionName : & gw1 .Source .Spec .Listeners [2 ].Name ,
821- },
822- {
823- Idx : 0 ,
824- Gateway : & ParentRefGateway {
825- NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
826- EffectiveNginxProxy : np1Effective ,
827- },
828- Attachment : & ParentRefAttachmentStatus {
829- Attached : true ,
830- AcceptedHostnames : map [string ][]string {
831792 CreateGatewayListenerKey (
832793 client .ObjectKeyFromObject (gw1 .Source ),
833794 "listener-8443" ,
834795 ): {"fizz.example.org" },
835796 },
836797 },
837- SectionName : & gw1 . Source . Spec . Listeners [ 3 ]. Name ,
798+ SectionName : nil , // No expansion - represents attachment to all listeners
838799 },
839800 },
840801 Spec : L4RouteSpec {
@@ -858,45 +819,6 @@ func TestBuildGraph(t *testing.T) {
858819 Attachable : true ,
859820 Source : tr2 ,
860821 ParentRefs : []ParentRef {
861- {
862- Idx : 0 ,
863- Gateway : & ParentRefGateway {
864- NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
865- EffectiveNginxProxy : np1Effective ,
866- },
867- Attachment : & ParentRefAttachmentStatus {
868- Attached : false ,
869- AcceptedHostnames : map [string ][]string {},
870- FailedConditions : []conditions.Condition {conditions .NewRouteNotAllowedByListeners ()},
871- },
872- SectionName : & gw1 .Source .Spec .Listeners [0 ].Name ,
873- },
874- {
875- Idx : 0 ,
876- Gateway : & ParentRefGateway {
877- NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
878- EffectiveNginxProxy : np1Effective ,
879- },
880- Attachment : & ParentRefAttachmentStatus {
881- AcceptedHostnames : map [string ][]string {},
882- Attached : false ,
883- FailedConditions : []conditions.Condition {conditions .NewRouteNotAllowedByListeners ()},
884- },
885- SectionName : & gw1 .Source .Spec .Listeners [1 ].Name ,
886- },
887- {
888- Idx : 0 ,
889- Gateway : & ParentRefGateway {
890- NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
891- EffectiveNginxProxy : np1Effective ,
892- },
893- Attachment : & ParentRefAttachmentStatus {
894- Attached : false ,
895- AcceptedHostnames : map [string ][]string {},
896- FailedConditions : []conditions.Condition {conditions .NewRouteHostnameConflict ()},
897- },
898- SectionName : & gw1 .Source .Spec .Listeners [2 ].Name ,
899- },
900822 {
901823 Idx : 0 ,
902824 Gateway : & ParentRefGateway {
@@ -908,7 +830,7 @@ func TestBuildGraph(t *testing.T) {
908830 AcceptedHostnames : map [string ][]string {},
909831 FailedConditions : []conditions.Condition {conditions .NewRouteHostnameConflict ()},
910832 },
911- SectionName : & gw1 . Source . Spec . Listeners [ 3 ]. Name ,
833+ SectionName : nil , // No expansion - represents attachment to all listeners
912834 },
913835 },
914836 Spec : L4RouteSpec {
0 commit comments