diff options
Diffstat (limited to 'tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py')
| -rw-r--r-- | tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py b/tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py index b645728659..9506c3c6d1 100644 --- a/tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py +++ b/tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py @@ -103,7 +103,7 @@ def expect_neighbor(router, interface, peer): topotest.router_json_cmp, tgen.gears[router], "show ip pim neighbor json", - {interface: {peer: {}}} + {interface: {peer: {}}}, ) _, result = topotest.run_and_expect(test_func, None, count=130, wait=1) assertmsg = '"{}" PIM convergence failure'.format(router) @@ -118,14 +118,14 @@ def test_wait_pim_convergence(): logger.info("waiting for PIM to converge") - expect_neighbor('r1', 'r1-eth0', '192.168.1.2') - expect_neighbor('r2', 'r2-eth0', '192.168.1.1') + expect_neighbor("r1", "r1-eth0", "192.168.1.2") + expect_neighbor("r2", "r2-eth0", "192.168.1.1") - expect_neighbor('r2', 'r2-eth1', '192.168.2.3') - expect_neighbor('r2', 'r2-eth2', '192.168.3.4') + expect_neighbor("r2", "r2-eth1", "192.168.2.3") + expect_neighbor("r2", "r2-eth2", "192.168.3.4") - expect_neighbor('r3', 'r3-eth0', '192.168.2.1') - expect_neighbor('r4', 'r4-eth0', '192.168.3.1') + expect_neighbor("r3", "r3-eth0", "192.168.2.1") + expect_neighbor("r4", "r4-eth0", "192.168.3.1") def test_bfd_peers(): @@ -143,7 +143,7 @@ def test_bfd_peers(): topotest.router_json_cmp, tgen.gears[router], "show bfd peers json", - [{"peer": peer, "status": "up"}] + [{"peer": peer, "status": "up"}], ) _, result = topotest.run_and_expect(test_func, None, count=10, wait=1) assertmsg = '"{}" BFD convergence failure'.format(router) @@ -173,7 +173,7 @@ def test_pim_reconvergence(): topotest.router_json_cmp, tgen.gears[router], "show ip pim neighbor json", - {interface: {peer: None}} + {interface: {peer: None}}, ) _, result = topotest.run_and_expect(test_func, None, count=4, wait=1) assertmsg = '"{}" PIM convergence failure'.format(router) @@ -199,23 +199,29 @@ def test_pim_bfd_profile(): topotest.router_json_cmp, tgen.gears[router], "show bfd peers json", - [settings] + [settings], ) _, result = topotest.run_and_expect(test_func, None, count=4, wait=1) assertmsg = '"{}" BFD convergence failure'.format(router) assert result is None, assertmsg - expect_bfd_peer_settings("r1", { - "peer": "192.168.1.2", - "receive-interval": 250, - "transmit-interval": 250, - }) - - expect_bfd_peer_settings("r2", { - "peer": "192.168.1.1", - "remote-receive-interval": 250, - "remote-transmit-interval": 250, - }) + expect_bfd_peer_settings( + "r1", + { + "peer": "192.168.1.2", + "receive-interval": 250, + "transmit-interval": 250, + }, + ) + + expect_bfd_peer_settings( + "r2", + { + "peer": "192.168.1.1", + "remote-receive-interval": 250, + "remote-transmit-interval": 250, + }, + ) def test_memory_leak(): |
