Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
Sridevi Ramesh | 206173d | 2016-08-16 05:41:40 -0500 | [diff] [blame] | 2 | Documentation This suite is for Verifying BMC & BIOS version exposed part |
| 3 | ... of system inventory |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 4 | |
| 5 | Resource ../lib/rest_client.robot |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 6 | Resource ../lib/openbmc_ffdc.robot |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 7 | Test Teardown FFDC On Test Case Fail |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 8 | |
| 9 | |
| 10 | *** Variables *** |
| 11 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 12 | *** Test Cases *** |
Sridevi Ramesh | 206173d | 2016-08-16 05:41:40 -0500 | [diff] [blame] | 13 | Test BMC Version |
| 14 | [Documentation] Verifying if the BMC Version field is set with valid strings.\n |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 15 | ... Expected in following format: |
| 16 | ... $ git describe --dirty |
| 17 | ... v0.1-34-g95f7347 |
| 18 | ... $ |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 19 | [Tags] Test_BMC_Version |
| 20 | |
George Keishing | ec80737 | 2016-12-05 03:54:51 -0600 | [diff] [blame] | 21 | ${resp}= OpenBMC Get Request |
| 22 | ... ${INVENTORY_URI}system/chassis/motherboard/bmc |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 23 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 24 | ${jsondata}= To Json ${resp.content} |
Sridevi Ramesh | 206173d | 2016-08-16 05:41:40 -0500 | [diff] [blame] | 25 | Should not be empty ${jsondata["data"]["version"]} msg=version field is empty |
| 26 | Should Match Regexp ${jsondata["data"]["version"]} ^v\\d+\.\\d+ |
| 27 | |
| 28 | Test BIOS Version |
| 29 | [Documentation] Verifying if the BIOS Version field is set with valid strings.\n |
| 30 | ... Expected in following format: |
| 31 | ... open-power-barreleye-v1.8 |
| 32 | ... $ |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 33 | [Tags] chassisboot Test_BIOS_Version |
Sridevi Ramesh | 83f5c59 | 2017-01-20 04:35:13 -0600 | [diff] [blame] | 34 | |
George Keishing | ec80737 | 2016-12-05 03:54:51 -0600 | [diff] [blame] | 35 | ${resp}= OpenBMC Get Request ${INVENTORY_URI}system/bios |
Sridevi Ramesh | 206173d | 2016-08-16 05:41:40 -0500 | [diff] [blame] | 36 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 37 | ${jsondata}= To Json ${resp.content} |
| 38 | Should not be empty ${jsondata["data"]["Version"]} msg=Version field is empty |
| 39 | Should Match Regexp ${jsondata["data"]["Version"]} ^open+\-\power+\-\ |