Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test dump functionality of OpenBMC. |
| 4 | |
| 5 | Resource ../lib/openbmc_ffdc.robot |
| 6 | Resource ../lib/rest_client.robot |
| 7 | Resource ../lib/dump_utils.robot |
| 8 | |
| 9 | Test Setup Open Connection And Log In |
| 10 | Test Teardown Post Testcase Execution |
| 11 | |
| 12 | *** Variables *** |
| 13 | |
| 14 | |
| 15 | *** Test Cases *** |
| 16 | |
| 17 | Verify User Initiated BMC Dump |
| 18 | [Documentation] Create user initiated BMC dump and verify dump |
| 19 | ... entry for it. |
| 20 | [Tags] Verify_User_Initiated_Dump |
| 21 | |
| 22 | Create User Initiated Dump |
| 23 | |
| 24 | |
| 25 | Delete User Initiated BMC Dump And Verify |
| 26 | [Documentation] Delete user initiated dump and verify. |
| 27 | [Tags] Delete_User_Initiated_Dump_And_Verify |
| 28 | |
| 29 | ${dump_id}= Create User Initiated Dump |
| 30 | |
| 31 | Delete BMC Dump ${dump_id} |
| 32 | |
| 33 | |
| 34 | Verify User Initiated Dump Size |
| 35 | [Documentation] Verify user Initiated BMC dump size is under 500k. |
| 36 | [Tags] Verify_User_Initiated_Dump_Size |
| 37 | |
| 38 | ${dump_id}= Create User Initiated Dump |
| 39 | |
| 40 | ${dump_size}= Read Attribute ${DUMP_ENTRY_URI}/${dump_id} Size |
| 41 | # Max size for dump is 500k |
| 42 | Should Be True 0 < ${dump_size} < 500000 |
| 43 | |
| 44 | |
| 45 | |
| 46 | Create Two User Initiated Dump And Delete One |
| 47 | [Documentation] Create two dumps and delete the first. |
| 48 | [Tags] Create_Two_User_Initiated_Dump_And_Delete_One |
| 49 | |
| 50 | ${dump_id_1}= Create User Initiated Dump |
| 51 | ${dump_id_2}= Create User Initiated Dump |
| 52 | |
| 53 | Delete BMC Dump ${dump_id_1} |
| 54 | |
| 55 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_1} |
| 56 | Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND} |
| 57 | |
| 58 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_2} |
| 59 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 60 | |
| 61 | |
| 62 | *** Keywords *** |
| 63 | |
| 64 | Post Testcase Execution |
| 65 | [Documentation] Do the post test teardown. |
| 66 | |
| 67 | Delete All Dumps |
| 68 | FFDC On Test Case Fail |
| 69 | Close All Connections |