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 |
George Keishing | 6db5202 | 2017-08-22 00:39:22 -0500 | [diff] [blame] | 35 | [Documentation] Verify user Initiated BMC dump size is under 200k. |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 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 |
George Keishing | 6db5202 | 2017-08-22 00:39:22 -0500 | [diff] [blame] | 41 | # Max size for dump is 200k = 200x1024 |
| 42 | Should Be True 0 < ${dump_size} < 204800 |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 43 | |
| 44 | |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 45 | Create Two User Initiated Dump And Delete One |
| 46 | [Documentation] Create two dumps and delete the first. |
| 47 | [Tags] Create_Two_User_Initiated_Dump_And_Delete_One |
| 48 | |
| 49 | ${dump_id_1}= Create User Initiated Dump |
| 50 | ${dump_id_2}= Create User Initiated Dump |
| 51 | |
| 52 | Delete BMC Dump ${dump_id_1} |
| 53 | |
| 54 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_1} |
| 55 | Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND} |
| 56 | |
| 57 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_2} |
| 58 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 59 | |
| 60 | |
Rahul Maheshwari | 0dafbb4 | 2017-08-22 13:17:52 -0500 | [diff] [blame] | 61 | Create And Delete BMC Dump Multiple Times |
| 62 | [Documentation] Create and delete BMC dump multiple times. |
| 63 | [Tags] Create_And_Delete_BMC_Dump_Multiple_Times |
| 64 | |
| 65 | :FOR ${INDEX} IN RANGE 1 5 |
| 66 | \ ${dump_id}= Create User Initiated Dump |
| 67 | \ Wait Until Keyword Succeeds 1 min 10 sec |
| 68 | ... Check Dump Existence ${dump_id} |
| 69 | \ Delete BMC Dump ${dump_id} |
| 70 | |
| 71 | |
| 72 | Delete All BMC Dumps And Verify |
| 73 | [Documentation] Delete all BMC dumps and verify. |
| 74 | [Tags] Delete_All_BMC_Dumps_And_Verify |
| 75 | |
| 76 | # Create some dump. |
| 77 | Create User Initiated Dump |
| 78 | Create User Initiated Dump |
| 79 | |
| 80 | Delete All Dumps |
| 81 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list |
| 82 | Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND} |
| 83 | |
| 84 | |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 85 | *** Keywords *** |
| 86 | |
| 87 | Post Testcase Execution |
| 88 | [Documentation] Do the post test teardown. |
| 89 | |
| 90 | Delete All Dumps |
| 91 | FFDC On Test Case Fail |
| 92 | Close All Connections |