diff --git a/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py b/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py index 6f9a58b19547..5e30cbd01371 100644 --- a/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py +++ b/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py @@ -82,6 +82,37 @@ def test_install_sharp_instance_routes(): if tgen.routers_have_failure(): pytest.skip(tgen.errors) + r1 = tgen.gears["r1"] + logger.info("Ensure that connected routes are actually installed") + expected = { + "192.168.100.0/24": [ + { + "prefix": "192.168.100.0/24", + "prefixLen": 24, + "protocol": "connected", + "vrfName": "default", + "selected": True, + "destSelected": True, + "installed": True, + "nexthops": [ + { + "fib": True, + "directlyConnected": True, + "interfaceName": "lo", + "active": True, + "weight": 1, + } + ], + } + ] + } + + test_func = partial( + topotest.router_json_cmp, r1, "show ip route connected json", expected + ) + + _, result = topotest.run_and_expect(test_func, None, count=30, wait=1) + logger.info("Installing sharp routes") r1 = tgen.gears["r1"] r1.vtysh_cmd("sharp install route 4.5.6.7 nexthop 192.168.100.2 1")