From e344d455dd7b2deecbe08b5af0358daa2929d2ba Mon Sep 17 00:00:00 2001 From: ShiyanWangMS Date: Tue, 3 Sep 2024 14:28:30 +0800 Subject: [PATCH] Skip allow list (#14367) --- tests/generic_config_updater/test_bgp_prefix.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/generic_config_updater/test_bgp_prefix.py b/tests/generic_config_updater/test_bgp_prefix.py index 52612e0ef9..65665403c2 100644 --- a/tests/generic_config_updater/test_bgp_prefix.py +++ b/tests/generic_config_updater/test_bgp_prefix.py @@ -22,6 +22,20 @@ PREFIXES_V6_RE = r"ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_0_COMMUNITY_{}_V6 seq \d+ permit {}" +@pytest.fixture(autouse=True) +def _ignore_allow_list_errlogs(duthosts, rand_one_dut_hostname, loganalyzer): + """Ignore expected failures logs during test execution.""" + if loganalyzer: + IgnoreRegex = [ + ".*ERR bgp#bgpcfgd: BGPAllowListMgr::Default action community value is not found.*", + ] + duthost = duthosts[rand_one_dut_hostname] + """Cisco 8111-O64 has different allow list config""" + if duthost.facts['hwsku'] == 'Cisco-8111-O64': + loganalyzer[rand_one_dut_hostname].ignore_regex.extend(IgnoreRegex) + return + + def get_bgp_prefix_runningconfig(duthost): """ Get bgp prefix config """