@@ -335,14 +335,18 @@ var _ = Describe("ChangeProcessor", func() {
335
335
HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
336
336
{Namespace : "test" , Name : "hr-1" }: {
337
337
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" ),
340
342
Conditions : append (
341
343
conditions .NewDefaultRouteConditions (),
342
344
conditions .NewTODO ("GatewayClass is invalid or doesn't exist" ),
343
345
),
344
346
},
345
- "listener-443-1" : {
347
+ {
348
+ GatewayNsName : client .ObjectKeyFromObject (gw1 ),
349
+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
346
350
Conditions : append (
347
351
conditions .NewDefaultRouteConditions (),
348
352
conditions .NewTODO ("GatewayClass is invalid or doesn't exist" ),
@@ -440,12 +444,16 @@ var _ = Describe("ChangeProcessor", func() {
440
444
HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
441
445
{Namespace : "test" , Name : "hr-1" }: {
442
446
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 (),
446
452
},
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 (),
449
457
},
450
458
},
451
459
},
@@ -549,12 +557,16 @@ var _ = Describe("ChangeProcessor", func() {
549
557
HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
550
558
{Namespace : "test" , Name : "hr-1" }: {
551
559
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 (),
555
565
},
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 (),
558
570
},
559
571
},
560
572
},
@@ -659,12 +671,16 @@ var _ = Describe("ChangeProcessor", func() {
659
671
HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
660
672
{Namespace : "test" , Name : "hr-1" }: {
661
673
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 (),
665
679
},
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 (),
668
684
},
669
685
},
670
686
},
@@ -768,12 +784,16 @@ var _ = Describe("ChangeProcessor", func() {
768
784
HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
769
785
{Namespace : "test" , Name : "hr-1" }: {
770
786
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 (),
774
792
},
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 (),
777
797
},
778
798
},
779
799
},
@@ -880,12 +900,16 @@ var _ = Describe("ChangeProcessor", func() {
880
900
HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
881
901
{Namespace : "test" , Name : "hr-1" }: {
882
902
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 (),
886
908
},
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 (),
889
913
},
890
914
},
891
915
},
@@ -981,25 +1005,33 @@ var _ = Describe("ChangeProcessor", func() {
981
1005
HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
982
1006
{Namespace : "test" , Name : "hr-1" }: {
983
1007
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 (),
987
1013
},
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 (),
990
1018
},
991
1019
},
992
1020
},
993
1021
{Namespace : "test" , Name : "hr-2" }: {
994
1022
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" ),
997
1027
Conditions : append (
998
1028
conditions .NewDefaultRouteConditions (),
999
1029
conditions .NewTODO ("Gateway is ignored" ),
1000
1030
),
1001
1031
},
1002
- "listener-443-1" : {
1032
+ {
1033
+ GatewayNsName : client .ObjectKeyFromObject (gw2 ),
1034
+ SectionName : helpers.GetPointer [v1beta1.SectionName ]("listener-443-1" ),
1003
1035
Conditions : append (
1004
1036
conditions .NewDefaultRouteConditions (),
1005
1037
conditions .NewTODO ("Gateway is ignored" ),
@@ -1098,12 +1130,16 @@ var _ = Describe("ChangeProcessor", func() {
1098
1130
HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
1099
1131
{Namespace : "test" , Name : "hr-2" }: {
1100
1132
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 (),
1104
1138
},
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 (),
1107
1143
},
1108
1144
},
1109
1145
},
@@ -2102,9 +2138,11 @@ var _ = Describe("ChangeProcessor", func() {
2102
2138
HTTPRouteStatuses : map [types.NamespacedName ]state.HTTPRouteStatus {
2103
2139
hrNsName : {
2104
2140
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 (),
2108
2146
},
2109
2147
},
2110
2148
},
0 commit comments