From 6246b57e7c1e868cefb118b07d75810bdb6a671a Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Thu, 9 Feb 2023 15:30:32 -0500 Subject: [PATCH] tests: add topotest to cover SVD flood entry Add a topotest to cover making sure SVD flood entries are installed with SVD. Signed-off-by: Stephen Worley --- .../test_bgp_evpn_vxlan_svd.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py b/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py index cef8260daf..ae0b67ac65 100755 --- a/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py +++ b/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py @@ -204,6 +204,13 @@ def check_vni_macs_present(tgen, router, vni, maclist): ) return None +def check_flood_entry_present(pe, vni, vtep): + output = pe.run("bridge fdb get 00:00:00:00:00:00 dev vxlan0 vni {} self".format(vni)) + + if str(vtep) not in output: + return output + + return None def test_pe1_converge_evpn(): "Wait for protocol convergence" @@ -233,6 +240,11 @@ def test_pe1_converge_evpn(): logger.warning("%s", result) assert None, '"{}" missing expected MACs'.format(pe1.name) + vtep = "10.30.30.30" + test_func = partial(check_flood_entry_present, pe1, 101, vtep) + _, result = topotest.run_and_expect(test_func, None, count=30, wait=1) + assertmsg = '"{}" Flood FDB Entry for VTEP {} not found'.format(pe1.name, vtep) + assert result is None, assertmsg def test_pe2_converge_evpn(): "Wait for protocol convergence" @@ -263,6 +275,11 @@ def test_pe2_converge_evpn(): logger.warning("%s", result) assert None, '"{}" missing expected MACs'.format(pe2.name) + vtep = "10.10.10.10" + test_func = partial(check_flood_entry_present, pe2, 101, vtep) + _, result = topotest.run_and_expect(test_func, None, count=30, wait=1) + assertmsg = '"{}" Flood FDB Entry for VTEP {} not found'.format(pe2.name, vtep) + assert result is None, assertmsg def mac_learn_test(host, local): "check the host MAC gets learned by the VNI"