Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integrated reboot-cause history into reboot tests in platfrom_tests/t…
…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
- Loading branch information