blob: b994124740958ac4c9e44d33b0a64a08f988623d [file] [log] [blame]
Rahul Maheshwariad676bf2017-06-22 15:06:05 -05001*** Settings ***
2
3Documentation Test dump functionality of OpenBMC.
4
5Resource ../lib/openbmc_ffdc.robot
6Resource ../lib/rest_client.robot
7Resource ../lib/dump_utils.robot
8
9Test Setup Open Connection And Log In
10Test Teardown Post Testcase Execution
11
12*** Variables ***
13
14
15*** Test Cases ***
16
17Verify 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
25Delete 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
34Verify User Initiated Dump Size
George Keishing6db52022017-08-22 00:39:22 -050035 [Documentation] Verify user Initiated BMC dump size is under 200k.
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050036 [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 Keishing6db52022017-08-22 00:39:22 -050041 # Max size for dump is 200k = 200x1024
42 Should Be True 0 < ${dump_size} < 204800
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050043
44
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050045Create 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 Maheshwari0dafbb42017-08-22 13:17:52 -050061Create 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
72Delete 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 Maheshwariad676bf2017-06-22 15:06:05 -050085*** Keywords ***
86
87Post Testcase Execution
88 [Documentation] Do the post test teardown.
89
90 Delete All Dumps
91 FFDC On Test Case Fail
92 Close All Connections