@@ -776,32 +776,6 @@ func TestBuildGraph(t *testing.T) {
776
776
Attachable : true ,
777
777
Source : tr ,
778
778
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
- },
805
779
{
806
780
Idx : 0 ,
807
781
Gateway : & ParentRefGateway {
@@ -815,26 +789,13 @@ func TestBuildGraph(t *testing.T) {
815
789
client .ObjectKeyFromObject (gw1 .Source ),
816
790
"listener-443-2" ,
817
791
): {"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 {
831
792
CreateGatewayListenerKey (
832
793
client .ObjectKeyFromObject (gw1 .Source ),
833
794
"listener-8443" ,
834
795
): {"fizz.example.org" },
835
796
},
836
797
},
837
- SectionName : & gw1 . Source . Spec . Listeners [ 3 ]. Name ,
798
+ SectionName : nil , // No expansion - represents attachment to all listeners
838
799
},
839
800
},
840
801
Spec : L4RouteSpec {
@@ -858,45 +819,6 @@ func TestBuildGraph(t *testing.T) {
858
819
Attachable : true ,
859
820
Source : tr2 ,
860
821
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
- },
900
822
{
901
823
Idx : 0 ,
902
824
Gateway : & ParentRefGateway {
@@ -908,7 +830,7 @@ func TestBuildGraph(t *testing.T) {
908
830
AcceptedHostnames : map [string ][]string {},
909
831
FailedConditions : []conditions.Condition {conditions .NewRouteHostnameConflict ()},
910
832
},
911
- SectionName : & gw1 . Source . Spec . Listeners [ 3 ]. Name ,
833
+ SectionName : nil , // No expansion - represents attachment to all listeners
912
834
},
913
835
},
914
836
Spec : L4RouteSpec {
0 commit comments