@@ -778,19 +778,59 @@ func TestBuildGraph(t *testing.T) {
778
778
NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
779
779
EffectiveNginxProxy : np1Effective ,
780
780
},
781
+ Attachment : & ParentRefAttachmentStatus {
782
+ AcceptedHostnames : map [string ][]string {},
783
+ Attached : false ,
784
+ FailedConditions : []conditions.Condition {conditions .NewRouteNotAllowedByListeners ()},
785
+ },
786
+ SectionName : & gw1 .Source .Spec .Listeners [0 ].Name ,
787
+ },
788
+ {
789
+ Idx : 1 ,
790
+ Gateway : & ParentRefGateway {
791
+ NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
792
+ EffectiveNginxProxy : np1Effective ,
793
+ },
794
+ Attachment : & ParentRefAttachmentStatus {
795
+ AcceptedHostnames : map [string ][]string {},
796
+ Attached : false ,
797
+ FailedConditions : []conditions.Condition {conditions .NewRouteNotAllowedByListeners ()},
798
+ },
799
+ SectionName : & gw1 .Source .Spec .Listeners [1 ].Name ,
800
+ },
801
+ {
802
+ Idx : 2 ,
803
+ Gateway : & ParentRefGateway {
804
+ NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
805
+ EffectiveNginxProxy : np1Effective ,
806
+ },
781
807
Attachment : & ParentRefAttachmentStatus {
782
808
Attached : true ,
783
809
AcceptedHostnames : map [string ][]string {
784
810
CreateGatewayListenerKey (
785
811
client .ObjectKeyFromObject (gw1 .Source ),
786
812
"listener-443-2" ,
787
813
): {"fizz.example.org" },
814
+ },
815
+ },
816
+ SectionName : & gw1 .Source .Spec .Listeners [2 ].Name ,
817
+ },
818
+ {
819
+ Idx : 3 ,
820
+ Gateway : & ParentRefGateway {
821
+ NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
822
+ EffectiveNginxProxy : np1Effective ,
823
+ },
824
+ Attachment : & ParentRefAttachmentStatus {
825
+ Attached : true ,
826
+ AcceptedHostnames : map [string ][]string {
788
827
CreateGatewayListenerKey (
789
828
client .ObjectKeyFromObject (gw1 .Source ),
790
829
"listener-8443" ,
791
830
): {"fizz.example.org" },
792
831
},
793
832
},
833
+ SectionName : & gw1 .Source .Spec .Listeners [3 ].Name ,
794
834
},
795
835
},
796
836
Spec : L4RouteSpec {
@@ -820,11 +860,51 @@ func TestBuildGraph(t *testing.T) {
820
860
NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
821
861
EffectiveNginxProxy : np1Effective ,
822
862
},
863
+ Attachment : & ParentRefAttachmentStatus {
864
+ Attached : false ,
865
+ AcceptedHostnames : map [string ][]string {},
866
+ FailedConditions : []conditions.Condition {conditions .NewRouteNotAllowedByListeners ()},
867
+ },
868
+ SectionName : & gw1 .Source .Spec .Listeners [0 ].Name ,
869
+ },
870
+ {
871
+ Idx : 1 ,
872
+ Gateway : & ParentRefGateway {
873
+ NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
874
+ EffectiveNginxProxy : np1Effective ,
875
+ },
876
+ Attachment : & ParentRefAttachmentStatus {
877
+ AcceptedHostnames : map [string ][]string {},
878
+ Attached : false ,
879
+ FailedConditions : []conditions.Condition {conditions .NewRouteNotAllowedByListeners ()},
880
+ },
881
+ SectionName : & gw1 .Source .Spec .Listeners [1 ].Name ,
882
+ },
883
+ {
884
+ Idx : 2 ,
885
+ Gateway : & ParentRefGateway {
886
+ NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
887
+ EffectiveNginxProxy : np1Effective ,
888
+ },
889
+ Attachment : & ParentRefAttachmentStatus {
890
+ Attached : false ,
891
+ AcceptedHostnames : map [string ][]string {},
892
+ FailedConditions : []conditions.Condition {conditions .NewRouteHostnameConflict ()},
893
+ },
894
+ SectionName : & gw1 .Source .Spec .Listeners [2 ].Name ,
895
+ },
896
+ {
897
+ Idx : 3 ,
898
+ Gateway : & ParentRefGateway {
899
+ NamespacedName : client .ObjectKeyFromObject (gw1 .Source ),
900
+ EffectiveNginxProxy : np1Effective ,
901
+ },
823
902
Attachment : & ParentRefAttachmentStatus {
824
903
Attached : false ,
825
904
AcceptedHostnames : map [string ][]string {},
826
905
FailedConditions : []conditions.Condition {conditions .NewRouteHostnameConflict ()},
827
906
},
907
+ SectionName : & gw1 .Source .Spec .Listeners [3 ].Name ,
828
908
},
829
909
},
830
910
Spec : L4RouteSpec {
0 commit comments