diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-01-31 20:41:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 20:41:30 +0100 |
commit | aa16204dfbff980a345dabef38ecf9d368b03879 (patch) | |
tree | e2c3319e1a62dc6e6ca0d65366849c1f93d74346 | |
parent | Merge pull request #12704 from donaldsharp/pim6_route_map (diff) | |
parent | tests: zebra_rib remove a sleep (diff) | |
download | frr-aa16204dfbff980a345dabef38ecf9d368b03879.tar.xz frr-aa16204dfbff980a345dabef38ecf9d368b03879.zip |
Merge pull request #12667 from donaldsharp/zebra_rib_fixup
tests: zebra_rib remove a sleep
-rw-r--r-- | tests/topotests/zebra_rib/test_zebra_rib.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/topotests/zebra_rib/test_zebra_rib.py b/tests/topotests/zebra_rib/test_zebra_rib.py index b72691b71..2334a198d 100644 --- a/tests/topotests/zebra_rib/test_zebra_rib.py +++ b/tests/topotests/zebra_rib/test_zebra_rib.py @@ -203,7 +203,16 @@ def test_route_map_usage(): r1.vtysh_cmd("conf\nip route 10.100.100.100/32 192.168.216.3") r1.vtysh_cmd("conf\nip route 10.100.100.101/32 10.0.0.44") r1.vtysh_cmd("sharp install route 10.0.0.0 nexthop 192.168.216.3 500") - sleep(4) + + def check_initial_routes_installed(router): + output = json.loads(router.vtysh_cmd("show ip route summ json")) + expected = { + "routes": [{"type": "static", "rib": 2}, {"type": "sharp", "rib": 500}] + } + return topotest.json_cmp(output, expected) + + test_func = partial(check_initial_routes_installed, r1) + success, result = topotest.run_and_expect(test_func, None, count=40, wait=1) static_rmapfile = "%s/r1/static_rmap.ref" % (thisDir) expected = open(static_rmapfile).read().rstrip() |