Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified ssdhealth test to account for currently supported disk types #14071

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/platform_tests/cli/test_show_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
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
Expand Down
Loading