Skip to content

Commit 01f8450

Browse files
ashwnsrimssonicbld
authored andcommitted
Modified ssdhealth test to account for currently supported disk types (#14071)
* Modified ssdhealth test to account for currently supported disk types * Print unsupported storage disk type before skipping test
1 parent f988eb6 commit 01f8450

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/platform_tests/cli/test_show_platform.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,15 @@ def test_show_platform_ssdhealth(duthosts, enum_supervisor_dut_hostname):
402402
"""
403403
duthost = duthosts[enum_supervisor_dut_hostname]
404404
cmd = " ".join([CMD_SHOW_PLATFORM, "ssdhealth"])
405+
supported_disks = ["SATA", "NVME"]
405406

406407
logging.info("Verifying output of '{}' on ''{}'...".format(cmd, duthost.hostname))
408+
407409
ssdhealth_output_lines = duthost.command(cmd)["stdout_lines"]
410+
if not any(disk_type in ssdhealth_output_lines[0] for disk_type in supported_disks):
411+
pytest.skip("Disk Type {} is not supported".format(ssdhealth_output_lines[0].split(':')[-1]))
408412
ssdhealth_dict = util.parse_colon_speparated_lines(ssdhealth_output_lines)
409-
expected_fields = {"Device Model", "Health", "Temperature"}
413+
expected_fields = {"Disk Type", "Device Model", "Health", "Temperature"}
410414
actual_fields = set(ssdhealth_dict.keys())
411415

412416
missing_fields = expected_fields - actual_fields

0 commit comments

Comments
 (0)