From 08e63a816298bcc05eb5395d8a26c3a5294cdb4f Mon Sep 17 00:00:00 2001 From: sanrajen Date: Thu, 24 Oct 2024 11:15:29 -0400 Subject: [PATCH 1/2] snmp - exclude recursive string from default route --- tests/snmp/test_snmp_default_route.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/snmp/test_snmp_default_route.py b/tests/snmp/test_snmp_default_route.py index 63d0250a0b7..dbf50c3e66a 100644 --- a/tests/snmp/test_snmp_default_route.py +++ b/tests/snmp/test_snmp_default_route.py @@ -31,7 +31,7 @@ def test_snmp_default_route(duthosts, enum_rand_one_per_hwsku_frontend_hostname, for line in dut_result['stdout_lines']: if 'via' in line: ip, interface = line.split('via') - ip = ip.strip("*, ") + ip = ip.strip("*, ,recursive") interface = interface.strip("*, ") if interface != "eth0" and 'Ethernet-BP' not in interface: dut_result_nexthops.append(ip) From 5d983a47019ef95d2d4a3682ccd8dd07f62ddeac Mon Sep 17 00:00:00 2001 From: sanrajen Date: Thu, 24 Oct 2024 11:07:37 -0400 Subject: [PATCH 2/2] snmp-queue - fix duthost --- tests/snmp/test_snmp_queue_counters.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/snmp/test_snmp_queue_counters.py b/tests/snmp/test_snmp_queue_counters.py index c8b234562c8..38994a2502d 100644 --- a/tests/snmp/test_snmp_queue_counters.py +++ b/tests/snmp/test_snmp_queue_counters.py @@ -66,7 +66,7 @@ def get_asic_interface(inter_facts): def test_snmp_queue_counters(duthosts, enum_rand_one_per_hwsku_frontend_hostname, enum_frontend_asic_index, - creds_all_duts, teardown): + creds_all_duts): """ Test SNMP queue counters - Set "create_only_config_db_buffers" to true in config db, to create @@ -163,12 +163,11 @@ def test_snmp_queue_counters(duthosts, (queue_counters_cnt_pre - multicast_expected_diff))) -@pytest.fixture(scope="module") +@pytest.fixture(autouse=True, scope="module") def teardown(duthosts, enum_rand_one_per_hwsku_frontend_hostname): """ Teardown procedure for all test function - :param duthosts: List of DUT hosts - :param enum_rand_one_per_hwsku_frontend_hostname: hostname of a randomly selected DUT + param duthosts: duthosts object """ duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname] yield