From 94640da23492df86a45c1a919bc64f809cd2a1ec Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Thu, 30 Nov 2023 16:07:40 +0100 Subject: 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 --- tests/topotests/bfd_topo3/test_bfd_topo3.py | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) 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)." -- cgit v1.2.3