Skip to content

Commit 4cf5e22

Browse files
congh-nvidiamssonicbld
authored andcommitted
Update sfp test for sonic-utilities PR#2953(#10914)
- What is the motivation for this PR? Update sfp test for sonic-utilities PR#2953 - How did you verify/test it? Run the test on dpu setup, test is skipped as expected.
1 parent 167ffb8 commit 4cf5e22

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/platform_tests/sfp/test_sfputil.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,9 @@ def test_check_sfputil_error_status(duthosts, enum_rand_one_per_hwsku_frontend_h
6363
portmap, dev_conn = get_dev_conn(duthost, conn_graph_facts, enum_frontend_asic_index)
6464

6565
logging.info("Check output of '{}'".format(cmd_sfp_error_status))
66-
sfp_error_status = duthost.command(cmd_sfp_error_status)
67-
for line in sfp_error_status["stdout_lines"][2:]:
68-
if "Not implemented" in line:
69-
pytest.skip("Skip test as error status isn't supported")
66+
sfp_error_status = duthost.command(cmd_sfp_error_status, module_ignore_errors=True)
67+
if "NOT implemented" in sfp_error_status['stdout']:
68+
pytest.skip("Skip test as error status isn't supported")
7069
parsed_presence = parse_output(sfp_error_status["stdout_lines"][2:])
7170
for intf in dev_conn:
7271
if intf not in xcvr_skip_list[duthost.hostname]:

0 commit comments

Comments
 (0)