Skip to content

Commit

Permalink
[ test show platform ] skip firmware status if not implemented (#5068)
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
To avoid TC fail in case command returns empty output

How did you do it?
Add skip mark

How did you verify/test it?
Run TC test_verify_show_platform_firmware_status_output , TC skipped

Any platform specific information?
Will be skipped for platforms when test_verify_show_platform_firmware_status_output is not implemented
  • Loading branch information
roman_savchuk authored Mar 17, 2022
1 parent 93bd66e commit ea98504
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/platform_tests/cli/test_show_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ def verify_show_platform_firmware_status_output(raw_output_lines, hostname):
"""
NUM_EXPECTED_COLS = 5

# Skip if command not implemented for platform
if len(raw_output_lines) <= 2:
pytest.skip("show platform firmware status not implemented")
pytest_assert(len(raw_output_lines) > 2, "There must be at least two lines of output on '{}'".format(hostname))
second_line = raw_output_lines[1]
field_ranges = util.get_field_range(second_line)
Expand Down

0 comments on commit ea98504

Please sign in to comment.