@@ -335,14 +335,18 @@ var _ = Describe("ChangeProcessor", func() {
335335 HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
336336 {Namespace : "test" , Name : "hr-1" }: {
337337 ObservedGeneration : hr1 .Generation ,
338- ParentStatuses : map [string ]state.ParentStatus {
339- "listener-80-1" : {
338+ ParentStatuses : []state.ParentStatus {
339+ {
340+ GatewayNsName : client .ObjectKeyFromObject (gw1 ),
341+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
340342 Conditions : append (
341343 conditions .NewDefaultRouteConditions (),
342344 conditions .NewTODO ("GatewayClass is invalid or doesn't exist" ),
343345 ),
344346 },
345- "listener-443-1" : {
347+ {
348+ GatewayNsName : client .ObjectKeyFromObject (gw1 ),
349+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
346350 Conditions : append (
347351 conditions .NewDefaultRouteConditions (),
348352 conditions .NewTODO ("GatewayClass is invalid or doesn't exist" ),
@@ -440,12 +444,16 @@ var _ = Describe("ChangeProcessor", func() {
440444 HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
441445 {Namespace : "test" , Name : "hr-1" }: {
442446 ObservedGeneration : hr1 .Generation ,
443- ParentStatuses : map [string ]state.ParentStatus {
444- "listener-80-1" : {
445- Conditions : conditions .NewDefaultRouteConditions (),
447+ ParentStatuses : []state.ParentStatus {
448+ {
449+ GatewayNsName : client .ObjectKeyFromObject (gw1 ),
450+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
451+ Conditions : conditions .NewDefaultRouteConditions (),
446452 },
447- "listener-443-1" : {
448- Conditions : conditions .NewDefaultRouteConditions (),
453+ {
454+ GatewayNsName : client .ObjectKeyFromObject (gw1 ),
455+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
456+ Conditions : conditions .NewDefaultRouteConditions (),
449457 },
450458 },
451459 },
@@ -549,12 +557,16 @@ var _ = Describe("ChangeProcessor", func() {
549557 HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
550558 {Namespace : "test" , Name : "hr-1" }: {
551559 ObservedGeneration : hr1Updated .Generation ,
552- ParentStatuses : map [string ]state.ParentStatus {
553- "listener-80-1" : {
554- Conditions : conditions .NewDefaultRouteConditions (),
560+ ParentStatuses : []state.ParentStatus {
561+ {
562+ GatewayNsName : client .ObjectKeyFromObject (gw1 ),
563+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
564+ Conditions : conditions .NewDefaultRouteConditions (),
555565 },
556- "listener-443-1" : {
557- Conditions : conditions .NewDefaultRouteConditions (),
566+ {
567+ GatewayNsName : client .ObjectKeyFromObject (gw1 ),
568+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
569+ Conditions : conditions .NewDefaultRouteConditions (),
558570 },
559571 },
560572 },
@@ -659,12 +671,16 @@ var _ = Describe("ChangeProcessor", func() {
659671 HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
660672 {Namespace : "test" , Name : "hr-1" }: {
661673 ObservedGeneration : hr1Updated .Generation ,
662- ParentStatuses : map [string ]state.ParentStatus {
663- "listener-80-1" : {
664- Conditions : conditions .NewDefaultRouteConditions (),
674+ ParentStatuses : []state.ParentStatus {
675+ {
676+ GatewayNsName : client .ObjectKeyFromObject (gw1Updated ),
677+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
678+ Conditions : conditions .NewDefaultRouteConditions (),
665679 },
666- "listener-443-1" : {
667- Conditions : conditions .NewDefaultRouteConditions (),
680+ {
681+ GatewayNsName : client .ObjectKeyFromObject (gw1Updated ),
682+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
683+ Conditions : conditions .NewDefaultRouteConditions (),
668684 },
669685 },
670686 },
@@ -768,12 +784,16 @@ var _ = Describe("ChangeProcessor", func() {
768784 HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
769785 {Namespace : "test" , Name : "hr-1" }: {
770786 ObservedGeneration : hr1Updated .Generation ,
771- ParentStatuses : map [string ]state.ParentStatus {
772- "listener-80-1" : {
773- Conditions : conditions .NewDefaultRouteConditions (),
787+ ParentStatuses : []state.ParentStatus {
788+ {
789+ GatewayNsName : client .ObjectKeyFromObject (gw1Updated ),
790+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
791+ Conditions : conditions .NewDefaultRouteConditions (),
774792 },
775- "listener-443-1" : {
776- Conditions : conditions .NewDefaultRouteConditions (),
793+ {
794+ GatewayNsName : client .ObjectKeyFromObject (gw1Updated ),
795+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
796+ Conditions : conditions .NewDefaultRouteConditions (),
777797 },
778798 },
779799 },
@@ -880,12 +900,16 @@ var _ = Describe("ChangeProcessor", func() {
880900 HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
881901 {Namespace : "test" , Name : "hr-1" }: {
882902 ObservedGeneration : hr1Updated .Generation ,
883- ParentStatuses : map [string ]state.ParentStatus {
884- "listener-80-1" : {
885- Conditions : conditions .NewDefaultRouteConditions (),
903+ ParentStatuses : []state.ParentStatus {
904+ {
905+ GatewayNsName : client .ObjectKeyFromObject (gw1Updated ),
906+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
907+ Conditions : conditions .NewDefaultRouteConditions (),
886908 },
887- "listener-443-1" : {
888- Conditions : conditions .NewDefaultRouteConditions (),
909+ {
910+ GatewayNsName : client .ObjectKeyFromObject (gw1Updated ),
911+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
912+ Conditions : conditions .NewDefaultRouteConditions (),
889913 },
890914 },
891915 },
@@ -981,25 +1005,33 @@ var _ = Describe("ChangeProcessor", func() {
9811005 HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
9821006 {Namespace : "test" , Name : "hr-1" }: {
9831007 ObservedGeneration : hr1Updated .Generation ,
984- ParentStatuses : map [string ]state.ParentStatus {
985- "listener-80-1" : {
986- Conditions : conditions .NewDefaultRouteConditions (),
1008+ ParentStatuses : []state.ParentStatus {
1009+ {
1010+ GatewayNsName : client .ObjectKeyFromObject (gw1Updated ),
1011+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
1012+ Conditions : conditions .NewDefaultRouteConditions (),
9871013 },
988- "listener-443-1" : {
989- Conditions : conditions .NewDefaultRouteConditions (),
1014+ {
1015+ GatewayNsName : client .ObjectKeyFromObject (gw1Updated ),
1016+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
1017+ Conditions : conditions .NewDefaultRouteConditions (),
9901018 },
9911019 },
9921020 },
9931021 {Namespace : "test" , Name : "hr-2" }: {
9941022 ObservedGeneration : hr2 .Generation ,
995- ParentStatuses : map [string ]state.ParentStatus {
996- "listener-80-1" : {
1023+ ParentStatuses : []state.ParentStatus {
1024+ {
1025+ GatewayNsName : client .ObjectKeyFromObject (gw2 ),
1026+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
9971027 Conditions : append (
9981028 conditions .NewDefaultRouteConditions (),
9991029 conditions .NewTODO ("Gateway is ignored" ),
10001030 ),
10011031 },
1002- "listener-443-1" : {
1032+ {
1033+ GatewayNsName : client .ObjectKeyFromObject (gw2 ),
1034+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
10031035 Conditions : append (
10041036 conditions .NewDefaultRouteConditions (),
10051037 conditions .NewTODO ("Gateway is ignored" ),
@@ -1098,12 +1130,16 @@ var _ = Describe("ChangeProcessor", func() {
10981130 HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
10991131 {Namespace : "test" , Name : "hr-2" }: {
11001132 ObservedGeneration : hr2 .Generation ,
1101- ParentStatuses : map [string ]state.ParentStatus {
1102- "listener-80-1" : {
1103- Conditions : conditions .NewDefaultRouteConditions (),
1133+ ParentStatuses : []state.ParentStatus {
1134+ {
1135+ GatewayNsName : client .ObjectKeyFromObject (gw2 ),
1136+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
1137+ Conditions : conditions .NewDefaultRouteConditions (),
11041138 },
1105- "listener-443-1" : {
1106- Conditions : conditions .NewDefaultRouteConditions (),
1139+ {
1140+ GatewayNsName : client .ObjectKeyFromObject (gw2 ),
1141+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
1142+ Conditions : conditions .NewDefaultRouteConditions (),
11071143 },
11081144 },
11091145 },
@@ -2102,9 +2138,11 @@ var _ = Describe("ChangeProcessor", func() {
21022138 HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
21032139 hrNsName : {
21042140 ObservedGeneration : hr .Generation ,
2105- ParentStatuses : map [string ]state.ParentStatus {
2106- "listener-80-1" : {
2107- Conditions : conditions .NewDefaultRouteConditions (),
2141+ ParentStatuses : []state.ParentStatus {
2142+ {
2143+ GatewayNsName : gwNsName ,
2144+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-80-1" ),
2145+ Conditions : conditions .NewDefaultRouteConditions (),
21082146 },
21092147 },
21102148 },
0 commit comments