diff options
author | Louis Scalbert <louis.scalbert@6wind.com> | 2023-11-30 16:07:40 +0100 |
---|---|---|
committer | Louis Scalbert <louis.scalbert@6wind.com> | 2023-12-01 14:09:00 +0100 |
commit | 94640da23492df86a45c1a919bc64f809cd2a1ec (patch) | |
tree | de8a9a247ed58cdfdfc7a616d2e1762ed1aaf3d6 | |
parent | topotests: redispatch tests in bfd_topo3 (diff) | |
download | frr-94640da23492df86a45c1a919bc64f809cd2a1ec.tar.xz frr-94640da23492df86a45c1a919bc64f809cd2a1ec.zip |
topotests: test wrong bfd source in bfd_topo3
Test setting a wrong bfd source and restore the source auto parameter.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
-rw-r--r-- | tests/topotests/bfd_topo3/test_bfd_topo3.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/topotests/bfd_topo3/test_bfd_topo3.py b/tests/topotests/bfd_topo3/test_bfd_topo3.py index f6985f25c..f767b0e7b 100644 --- a/tests/topotests/bfd_topo3/test_bfd_topo3.py +++ b/tests/topotests/bfd_topo3/test_bfd_topo3.py @@ -213,6 +213,45 @@ def test_static_route_monitoring_convergence(): expect_static_bfd_output("r6", "bfd-static") +def test_static_route_monitoring_wrong_source(): + "Test that static monitoring fails if setting a wrong source." + + tgen = get_topogen() + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + logger.info("test route wrong ") + + tgen.gears["r3"].vtysh_cmd( + """ +configure +ipv6 route 2001:db8:5::/64 2001:db8:4::3 bfd multi-hop source 2001:db8:4::2 profile slow-tx +""" + ) + + expect_route_missing("r3", "ipv6", "2001:db8:5::/64") + + +def test_static_route_monitoring_unset_source(): + "Test that static monitoring fails if setting a wrong source." + + tgen = get_topogen() + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + logger.info("test route wrong ") + + tgen.gears["r3"].vtysh_cmd( + """ +configure +ipv6 route 2001:db8:5::/64 2001:db8:4::3 bfd multi-hop profile slow-tx +""" + ) + + expect_static_bfd_output("r3", "bfd-static") + expect_static_bfd_output("r6", "bfd-static") + + def test_expect_static_rib_removal(): "Test that route got removed from RIB (staticd and bgpd)." |