-
Notifications
You must be signed in to change notification settings - Fork 771
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
integrated reboot-cause history into reboot tests in platfrom_tests/test_reboot.py #4270
integrated reboot-cause history into reboot tests in platfrom_tests/test_reboot.py #4270
Conversation
This pull request introduces 1 alert when merging f8100cc into 7c947a7 - view on LGTM.com new alerts:
|
2021_09_09_13_30_52 soft-reboot Thu 09 Sep 2021 01:30:24 PM UTC admin N/A | ||
2021_09_09_13_24_17 reboot Thu 09 Sep 2021 01:23:17 PM UTC admin N/A | ||
""" | ||
reboot_cause_history_got = dut.show_and_parse("show reboot-cause history") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
show reboot-cause history is a new feature in 202012, can we make it a new test and skip the test for release before 202012?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because reboot consume too much time, so I don't create a new test for it, and want to leverage the reboot-cause history generated by them to test it.
can we add an version check when version is before 202012, skip the test. Is it ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok to skip the check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…est_reboot.py (sonic-net#4270) This is to add test case in sonic-mgmt/tests/platform_tests/test_reboot.py to cover new feature reboot-cause history introduced in sonic-net/SONiC#669. Example: show reboot-cause history Name Cause Time User Comment ------------------- ------------- ------------------------------- ------ --------- 2021_09_09_14_15_13 Power Loss () N/A N/A N/A 2021_09_09_14_06_17 reboot Thu 09 Sep 2021 02:05:17 PM UTC admin N/A 2021_09_09_13_59_11 Watchdog () N/A N/A N/A 2021_09_09_13_52_13 Power Loss () N/A N/A N/A 2021_09_09_13_45_18 warm-reboot Thu 09 Sep 2021 01:44:14 PM UTC admin N/A 2021_09_09_13_37_58 fast-reboot Thu 09 Sep 2021 01:37:09 PM UTC admin N/A 2021_09_09_13_30_52 soft-reboot Thu 09 Sep 2021 01:30:24 PM UTC admin N/A 2021_09_09_13_24_17 reboot Thu 09 Sep 2021 01:23:17 PM UTC admin N/A What is the motivation for this PR? In order to verify reboot-cause history function, add new checker for "show reboot-cause history" into reboot tests How did you do it? Add one new function of check_reboot_cause_history in sonic-mgmt/tests/platform_tests/test_reboot.py. In test_reboot.py, there are 8 different reboot tests. In order to save test execution time, we leverage the reboot-cause history generated by them to test it. 1. Verify the reboot-cause history title 2. Verify reboot-cause output are sorted in reverse chronological order
Description of PR
Summary:
Fixes # (issue)
Since adding the feature(sonic-net/SONiC#669) of show reboot-cause history, so integrate "show reboot-cause history" into sonic-mgmt/tests/platform_tests/test_reboot.py.
e.g.
Type of change
Back port request
Approach
What is the motivation for this PR?
In order to verify reboot-cause history function, add new checker for "show reboot-cause history" into reboot tests
How did you do it?
Add one new function of check_reboot_cause_history in sonic-mgmt/tests/platform_tests/test_reboot.py.
In test_reboot.py, there are 8 different reboot tests. In order to save test execution time, we leverage the reboot-cause history generated by them to test it.
How did you verify/test it?
run test_reboot.py
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
sonic-net/SONiC#669