Skip to content

Commit 02c2da3

Browse files
Adjust SSD health check to validate range, not threshold (#21127)
The test now asserts that SSD health is between 0 and 100, instead of the previous, stricter check for >50. It now ensures the reported health value is sane and falls within the valid range of 0% to 100%.
1 parent 8ee0528 commit 02c2da3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/platform_tests/cli/test_show_platform.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,8 @@ def test_show_platform_ssdhealth(duthosts, enum_supervisor_dut_hostname):
543543

544544
if key == "Health":
545545
health_float_value = float(line_data.strip("%"))
546-
pytest_assert(health_float_value > 50.0, "SSD health is '{}', SSD replacement required".format(line_data))
546+
pytest_assert(0.0 <= health_float_value <= 100.0,
547+
"SSD health value '{}' is outside the expected 0-100 range".format(health_float_value))
547548

548549
if key == "Temperature":
549550
temp_float_value = float(line_data.strip("C"))

0 commit comments

Comments
 (0)