mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
commit
7e3d4048a6
|
@ -99,7 +99,7 @@ def teardown_module(mod):
|
|||
def test_ping():
|
||||
tgen = get_topogen()
|
||||
|
||||
check_ping("c11", "192.168.2.1", True, 10, 1)
|
||||
check_ping("c11", "192.168.2.1", True, 120, 1)
|
||||
check_ping("c11", "192.168.3.1", True, 10, 1)
|
||||
check_ping("c12", "192.168.2.1", True, 10, 1)
|
||||
check_ping("c12", "192.168.3.1", True, 10, 1)
|
||||
|
|
|
@ -95,7 +95,7 @@ def open_json_file(filename):
|
|||
assert False, "Could not read file {}".format(filename)
|
||||
|
||||
|
||||
def check_rib(name, cmd, expected_file):
|
||||
def check_rib(name, cmd, expected_file, count=30, wait=0.5):
|
||||
def _check(name, dest_addr, match):
|
||||
logger.info("polling")
|
||||
tgen = get_topogen()
|
||||
|
@ -107,12 +107,12 @@ def check_rib(name, cmd, expected_file):
|
|||
logger.info('[+] check {} "{}" {}'.format(name, cmd, expected_file))
|
||||
tgen = get_topogen()
|
||||
func = functools.partial(_check, name, cmd, expected_file)
|
||||
_, result = topotest.run_and_expect(func, None, count=10, wait=0.5)
|
||||
_, result = topotest.run_and_expect(func, None, count, wait)
|
||||
assert result is None, "Failed"
|
||||
|
||||
|
||||
def test_rib():
|
||||
check_rib("r1", "show bgp ipv4 vpn json", "r1/vpnv4_rib.json")
|
||||
check_rib("r1", "show bgp ipv4 vpn json", "r1/vpnv4_rib.json", 120, 1)
|
||||
check_rib("r2", "show bgp ipv4 vpn json", "r2/vpnv4_rib.json")
|
||||
check_rib("r1", "show ip route vrf vrf10 json", "r1/vrf10v4_rib.json")
|
||||
check_rib("r1", "show ip route vrf vrf20 json", "r1/vrf20v4_rib.json")
|
||||
|
|
Loading…
Reference in a new issue