From 7c5f5d34cffbc8b35616d900ed00a42b34115daf Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 6 Jun 2023 12:13:50 -0400 Subject: [PATCH] tests: The bgp_flowspec frequently fails try to gather more data Add a bit of code to allow the bgp_flowspec topotest to gather data when something goes wrong. Signed-off-by: Donald Sharp --- tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py b/tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py index fd675dc8aeb5..4454545326a0 100644 --- a/tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py +++ b/tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py @@ -51,6 +51,7 @@ from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger +from lib.common_config import generate_support_bundle # Required to instantiate the topology builder class. @@ -139,7 +140,9 @@ def test_bgp_convergence(): ) _, res = topotest.run_and_expect(test_func, None, count=90, wait=0.5) assertmsg = "BGP router network did not converge" - assert res is None, assertmsg + if res is not None: + generate_support_bundle() + assert res is None, assertmsg def test_bgp_flowspec():