diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-15 14:49:24 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-06-22 14:51:07 +0200 |
commit | cc54c0729815164eb2b078e4fc09c725ad5c4ff8 (patch) | |
tree | 3bd5a54a1b66aba2a4aab2816d4ebbb90126fb6a /tests | |
parent | bgpd: Allow aspath prepending for default-originate with route-maps (diff) | |
download | frr-cc54c0729815164eb2b078e4fc09c725ad5c4ff8.tar.xz frr-cc54c0729815164eb2b078e4fc09c725ad5c4ff8.zip |
tests: Check if as-path prepends work with route-maps and default-originate
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'tests')
4 files changed, 8 insertions, 2 deletions
diff --git a/tests/topotests/bgp_default_route_route_map_match_set/r1/bgpd.conf b/tests/topotests/bgp_default_route_route_map_match_set/r1/bgpd.conf index 6ef8b1c0f..32ac7c517 100644 --- a/tests/topotests/bgp_default_route_route_map_match_set/r1/bgpd.conf +++ b/tests/topotests/bgp_default_route_route_map_match_set/r1/bgpd.conf @@ -12,6 +12,7 @@ bgp community-list standard default seq 5 permit 65000:1 route-map default permit 10 match community default set metric 123 + set as-path prepend 65000 65000 65000 ! route-map internal permit 10 set community 65000:1 diff --git a/tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py b/tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py index d9ea5db27..12d1d01bf 100644 --- a/tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py +++ b/tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py @@ -94,7 +94,9 @@ def test_bgp_default_originate_route_map(): def _bgp_default_route_has_metric(router): output = json.loads(router.vtysh_cmd("show ip bgp 0.0.0.0/0 json")) - expected = {"paths": [{"metric": 123}]} + expected = { + "paths": [{"aspath": {"string": "65000 65000 65000 65000"}, "metric": 123}] + } return topotest.json_cmp(output, expected) test_func = functools.partial(_bgp_converge, router) diff --git a/tests/topotests/bgp_default_route_route_map_set/r1/bgpd.conf b/tests/topotests/bgp_default_route_route_map_set/r1/bgpd.conf index cb07ea9fd..6f6d39440 100644 --- a/tests/topotests/bgp_default_route_route_map_set/r1/bgpd.conf +++ b/tests/topotests/bgp_default_route_route_map_set/r1/bgpd.conf @@ -8,4 +8,5 @@ router bgp 65000 ! route-map default permit 10 set metric 123 + set as-path prepend 65000 65000 65000 ! diff --git a/tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py b/tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py index 9a22c58b1..2622c33f5 100644 --- a/tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py +++ b/tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py @@ -93,7 +93,9 @@ def test_bgp_default_originate_route_map(): def _bgp_default_route_has_metric(router): output = json.loads(router.vtysh_cmd("show ip bgp 0.0.0.0/0 json")) - expected = {"paths": [{"metric": 123}]} + expected = { + "paths": [{"aspath": {"string": "65000 65000 65000 65000"}, "metric": 123}] + } return topotest.json_cmp(output, expected) test_func = functools.partial(_bgp_converge, router) |