diff --git a/tests/platform_tests/cli/test_show_platform.py b/tests/platform_tests/cli/test_show_platform.py index f4ecbbc580d..741878c3323 100644 --- a/tests/platform_tests/cli/test_show_platform.py +++ b/tests/platform_tests/cli/test_show_platform.py @@ -447,11 +447,15 @@ def test_show_platform_ssdhealth(duthosts, enum_supervisor_dut_hostname): """ duthost = duthosts[enum_supervisor_dut_hostname] cmd = " ".join([CMD_SHOW_PLATFORM, "ssdhealth"]) + supported_disks = ["SATA", "NVME"] logging.info("Verifying output of '{}' on ''{}'...".format(cmd, duthost.hostname)) + ssdhealth_output_lines = duthost.command(cmd)["stdout_lines"] + if not any(disk_type in ssdhealth_output_lines[0] for disk_type in supported_disks): + pytest.skip("Disk Type {} is not supported".format(ssdhealth_output_lines[0].split(':')[-1])) ssdhealth_dict = util.parse_colon_speparated_lines(ssdhealth_output_lines) - expected_fields = {"Device Model", "Health", "Temperature"} + expected_fields = {"Disk Type", "Device Model", "Health", "Temperature"} actual_fields = set(ssdhealth_dict.keys()) missing_fields = expected_fields - actual_fields