From 3cd1c34cb79144413fe6c049e551481cfbf06ca2 Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Thu, 11 Jan 2024 11:17:54 +0100 Subject: [PATCH] topotests: nhrp_topo, test absence of noarp flag Test the absence the NOARP flag on rX-gre0 interfaces. It is present by default. Signed-off-by: Louis Scalbert --- tests/topotests/nhrp_topo/test_nhrp_topo.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/topotests/nhrp_topo/test_nhrp_topo.py b/tests/topotests/nhrp_topo/test_nhrp_topo.py index 78b82eda79..26115de2b8 100644 --- a/tests/topotests/nhrp_topo/test_nhrp_topo.py +++ b/tests/topotests/nhrp_topo/test_nhrp_topo.py @@ -182,6 +182,27 @@ def test_protocols_convergence(): assertmsg = '"{}" JSON output mismatches'.format(router.name) assert result is None, assertmsg + # check that the NOARP flag is removed from rX-gre0 interfaces + for rname, router in router_list.items(): + if rname == "r3": + continue + + expected = { + "{}-gre0".format(rname): { + "flags": "", + } + } + test_func = partial( + topotest.router_json_cmp, + router, + "show interface {}-gre0 json".format(rname), + expected, + ) + _, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5) + + assertmsg = '"{}-gre0 interface flags incorrect'.format(router.name) + assert result is None, assertmsg + for rname, router in router_list.items(): if rname == "r3": continue