From f832f2594fa9cbc36210efff7244d21562f1f5e2 Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Thu, 14 Nov 2024 11:28:24 +0100 Subject: [PATCH] tests: fix no vrf1 in bgp_bmp r2 The bgp_bmp test is failing because r2 lacks the vrf1 VRF, which prevents it from exporting VPN prefixes from the configured vrf1 BGP instance. Previous versions allowed the export of static BGP prefixes from a non-existent VRF, so the test passed under those conditions. Add a vrf1 VRF on r2. Fixes: d748544769 ("topotests: add basic bgp bmp test") Signed-off-by: Louis Scalbert --- tests/topotests/bgp_bmp/test_bgp_bmp.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp.py b/tests/topotests/bgp_bmp/test_bgp_bmp.py index 658ad2b99a2c..87dc4e91efa2 100644 --- a/tests/topotests/bgp_bmp/test_bgp_bmp.py +++ b/tests/topotests/bgp_bmp/test_bgp_bmp.py @@ -76,6 +76,13 @@ def setup_module(mod): "tcpdump -nni r1-eth0 -s 0 -w /tmp/bmp.pcap &", stdout=None ) + tgen.net["r2"].cmd( + """ +ip link add vrf1 type vrf table 10 +ip link set vrf1 up +""" + ) + for rname, router in tgen.routers().items(): router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))