@@ -321,6 +321,23 @@ func Test_AddPolicies(t *testing.T) {
321321 RouteAction : gobgpapi .RouteAction_REJECT ,
322322 },
323323 },
324+ {
325+ Name : "kube_router_import_stmt1" ,
326+ Conditions : & gobgpapi.Conditions {
327+ PrefixSet : & gobgpapi.MatchSet {
328+ MatchType : gobgpapi .MatchType_ANY ,
329+ Name : "defaultroutedefinedset" ,
330+ },
331+ NeighborSet : & gobgpapi.MatchSet {
332+ MatchType : gobgpapi .MatchType_ANY ,
333+ Name : "allpeerset" ,
334+ },
335+ RpkiResult : - 1 ,
336+ },
337+ Actions : & gobgpapi.Actions {
338+ RouteAction : gobgpapi .RouteAction_REJECT ,
339+ },
340+ },
324341 },
325342 nil ,
326343 nil ,
@@ -458,6 +475,23 @@ func Test_AddPolicies(t *testing.T) {
458475 RouteAction : gobgpapi .RouteAction_REJECT ,
459476 },
460477 },
478+ {
479+ Name : "kube_router_import_stmt1" ,
480+ Conditions : & gobgpapi.Conditions {
481+ PrefixSet : & gobgpapi.MatchSet {
482+ MatchType : gobgpapi .MatchType_ANY ,
483+ Name : "defaultroutedefinedset" ,
484+ },
485+ NeighborSet : & gobgpapi.MatchSet {
486+ MatchType : gobgpapi .MatchType_ANY ,
487+ Name : "allpeerset" ,
488+ },
489+ RpkiResult : - 1 ,
490+ },
491+ Actions : & gobgpapi.Actions {
492+ RouteAction : gobgpapi .RouteAction_REJECT ,
493+ },
494+ },
461495 },
462496 nil ,
463497 nil ,
@@ -618,6 +652,23 @@ func Test_AddPolicies(t *testing.T) {
618652 RouteAction : gobgpapi .RouteAction_REJECT ,
619653 },
620654 },
655+ {
656+ Name : "kube_router_import_stmt1" ,
657+ Conditions : & gobgpapi.Conditions {
658+ PrefixSet : & gobgpapi.MatchSet {
659+ MatchType : gobgpapi .MatchType_ANY ,
660+ Name : "defaultroutedefinedset" ,
661+ },
662+ NeighborSet : & gobgpapi.MatchSet {
663+ MatchType : gobgpapi .MatchType_ANY ,
664+ Name : "allpeerset" ,
665+ },
666+ RpkiResult : - 1 ,
667+ },
668+ Actions : & gobgpapi.Actions {
669+ RouteAction : gobgpapi .RouteAction_REJECT ,
670+ },
671+ },
621672 },
622673 nil ,
623674 nil ,
@@ -777,6 +828,23 @@ func Test_AddPolicies(t *testing.T) {
777828 RouteAction : gobgpapi .RouteAction_REJECT ,
778829 },
779830 },
831+ {
832+ Name : "kube_router_import_stmt1" ,
833+ Conditions : & gobgpapi.Conditions {
834+ PrefixSet : & gobgpapi.MatchSet {
835+ MatchType : gobgpapi .MatchType_ANY ,
836+ Name : "defaultroutedefinedset" ,
837+ },
838+ NeighborSet : & gobgpapi.MatchSet {
839+ MatchType : gobgpapi .MatchType_ANY ,
840+ Name : "allpeerset" ,
841+ },
842+ RpkiResult : - 1 ,
843+ },
844+ Actions : & gobgpapi.Actions {
845+ RouteAction : gobgpapi .RouteAction_REJECT ,
846+ },
847+ },
780848 },
781849 nil ,
782850 fmt .Errorf ("both %s and %s must be set" , pathPrependASNAnnotation , pathPrependRepeatNAnnotation ),
@@ -941,6 +1009,23 @@ func Test_AddPolicies(t *testing.T) {
9411009 RouteAction : gobgpapi .RouteAction_REJECT ,
9421010 },
9431011 },
1012+ {
1013+ Name : "kube_router_import_stmt1" ,
1014+ Conditions : & gobgpapi.Conditions {
1015+ PrefixSet : & gobgpapi.MatchSet {
1016+ MatchType : gobgpapi .MatchType_ANY ,
1017+ Name : "defaultroutedefinedset" ,
1018+ },
1019+ NeighborSet : & gobgpapi.MatchSet {
1020+ MatchType : gobgpapi .MatchType_ANY ,
1021+ Name : "allpeerset" ,
1022+ },
1023+ RpkiResult : - 1 ,
1024+ },
1025+ Actions : & gobgpapi.Actions {
1026+ RouteAction : gobgpapi .RouteAction_REJECT ,
1027+ },
1028+ },
9441029 },
9451030 nil ,
9461031 nil ,
0 commit comments