George Keishing | 8cca7fb | 2019-05-30 04:23:50 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Inventory of hardware resources under systems. |
| 3 | |
| 4 | Resource ../../../lib/bmc_redfish_resource.robot |
| 5 | Resource ../../../lib/bmc_redfish_utils.robot |
| 6 | Resource ../../../lib/logging_utils.robot |
| 7 | Resource ../../../lib/openbmc_ffdc.robot |
| 8 | |
George Keishing | b0a491f | 2019-05-31 02:49:22 -0500 | [diff] [blame^] | 9 | Test Setup Test Setup Execution |
George Keishing | 8cca7fb | 2019-05-30 04:23:50 -0500 | [diff] [blame] | 10 | Test Teardown Test Teardown Execution |
George Keishing | b0a491f | 2019-05-31 02:49:22 -0500 | [diff] [blame^] | 11 | Suite Teardown Suite Teardown Execution |
George Keishing | 8cca7fb | 2019-05-30 04:23:50 -0500 | [diff] [blame] | 12 | |
| 13 | *** Test Cases *** |
| 14 | |
| 15 | Event Log Check After BMC Reboot |
| 16 | [Documentation] Check event log after BMC rebooted. |
| 17 | [Tags] Event_Log_Check_After_BMC_Reboot |
| 18 | |
| 19 | Redfish Purge Event Log |
| 20 | Event Log Should Not Exist |
| 21 | |
| 22 | Redfish OBMC Reboot (off) |
| 23 | |
| 24 | Redfish.Login |
| 25 | Wait Until Keyword Succeeds 1 mins 15 secs Redfish.Get ${EVENT_LOG_URI}Entries |
| 26 | |
| 27 | Event Log Should Not Exist |
| 28 | |
| 29 | |
George Keishing | b0a491f | 2019-05-31 02:49:22 -0500 | [diff] [blame^] | 30 | Event Log Check After Host Poweron |
| 31 | [Documentation] Check event log after host has booted. |
| 32 | [Tags] Event_Log_Check_After_Host_Poweron |
| 33 | |
| 34 | Redfish Purge Event Log |
| 35 | Event Log Should Not Exist |
| 36 | |
| 37 | Redfish Power On |
| 38 | |
| 39 | Redfish.Login |
| 40 | Event Log Should Not Exist |
| 41 | |
| 42 | |
| 43 | Create Test Event Log And Verify |
| 44 | [Documentation] Create event logs and verify via redfish. |
| 45 | [Tags] Create_Test_Event_Log_And_Verify |
| 46 | |
| 47 | Create Test Error Log |
| 48 | Event Log Should Exist |
| 49 | |
| 50 | |
| 51 | Test Event Log Persistency On Restart |
| 52 | [Documentation] Restart logging service and verify event logs. |
| 53 | [Tags] Test_Event_Log_Persistency_On_Restart |
| 54 | |
| 55 | Create Test Error Log |
| 56 | Event Log Should Exist |
| 57 | |
| 58 | BMC Execute Command |
| 59 | ... systemctl restart xyz.openbmc_project.Logging.service |
| 60 | Sleep 10s reason=Wait for logging service to restart properly. |
| 61 | |
| 62 | Event Log Should Exist |
| 63 | |
| 64 | |
| 65 | Test Event Entry Numbering Reset On Restart |
| 66 | [Documentation] Restart logging service and verify event logs entry starts |
| 67 | ... from entry "Id" 1. |
| 68 | [Tags] Test_Event_Entry_Numbering_Reset_On_Restart |
| 69 | |
| 70 | #{ |
| 71 | # "@odata.context": "/redfish/v1/$metadata#LogEntryCollection.LogEntryCollection", |
| 72 | # "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries", |
| 73 | # "@odata.type": "#LogEntryCollection.LogEntryCollection", |
| 74 | # "Description": "Collection of System Event Log Entries", |
| 75 | # "Members": [ |
| 76 | # { |
| 77 | # "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", |
| 78 | # "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1", |
| 79 | # "@odata.type": "#LogEntry.v1_4_0.LogEntry", |
| 80 | # "Created": "2019-05-29T13:19:27+00:00", |
| 81 | # "EntryType": "Event", |
| 82 | # "Id": "1", <----- Event log ID |
| 83 | # "Message": "org.open_power.Host.Error.Event", |
| 84 | # "Name": "System DBus Event Log Entry", |
| 85 | # "Severity": "Critical" |
| 86 | # } |
| 87 | # ], |
| 88 | # "Members@odata.count": 1, |
| 89 | # "Name": "System Event Log Entries" |
| 90 | #} |
| 91 | |
| 92 | Create Test Error Log |
| 93 | Create Test Error Log |
| 94 | Event Log Should Exist |
| 95 | |
| 96 | Redfish Purge Event Log |
| 97 | Event Log Should Not Exist |
| 98 | |
| 99 | BMC Execute Command |
| 100 | ... systemctl restart xyz.openbmc_project.Logging.service |
| 101 | Sleep 10s reason=Wait for logging service to restart properly. |
| 102 | |
| 103 | Create Test Error Log |
| 104 | ${elogs}= Get Event Logs |
| 105 | Should Be Equal ${elogs[0]["Id"]} 1 msg=Event log entry is not 1. |
| 106 | |
| 107 | |
| 108 | Test Event Log Persistency On Reboot |
| 109 | [Documentation] Reboot BMC and verify event log. |
| 110 | [Tags] Test_Event_Log_Persistency_On_Reboot |
| 111 | |
| 112 | Redfish Purge Event Log |
| 113 | Create Test Error Log |
| 114 | Event Log Should Exist |
| 115 | |
| 116 | Redfish OBMC Reboot (off) |
| 117 | |
| 118 | Redfish.Login |
| 119 | Wait Until Keyword Succeeds 1 mins 15 secs Redfish.Get ${EVENT_LOG_URI}Entries |
| 120 | |
| 121 | Event Log Should Exist |
| 122 | |
| 123 | |
George Keishing | 8cca7fb | 2019-05-30 04:23:50 -0500 | [diff] [blame] | 124 | *** Keywords *** |
| 125 | |
| 126 | Suite Teardown Execution |
| 127 | [Documentation] Do the post suite teardown. |
| 128 | |
| 129 | Redfish.Logout |
| 130 | |
| 131 | |
George Keishing | b0a491f | 2019-05-31 02:49:22 -0500 | [diff] [blame^] | 132 | Test Setup Execution |
| 133 | [Documentation] Do test case setup tasks. |
George Keishing | 8cca7fb | 2019-05-30 04:23:50 -0500 | [diff] [blame] | 134 | |
| 135 | Redfish.Login |
| 136 | |
| 137 | ${status}= Run Keyword And Return Status Logging Test Binary Exist |
| 138 | Run Keyword If ${status} == ${False} Install Tarball |
| 139 | |
| 140 | |
| 141 | Test Teardown Execution |
| 142 | [Documentation] Do the post test teardown. |
| 143 | |
| 144 | FFDC On Test Case Fail |
George Keishing | b0a491f | 2019-05-31 02:49:22 -0500 | [diff] [blame^] | 145 | Redfish Purge Event Log |
George Keishing | 8cca7fb | 2019-05-30 04:23:50 -0500 | [diff] [blame] | 146 | |
| 147 | |
| 148 | Event Log Should Not Exist |
| 149 | [Documentation] Event log entries should not exist. |
| 150 | |
| 151 | ${elogs}= Get Event Logs |
| 152 | Should Be Empty ${elogs} msg=System event log entry is not empty. |
George Keishing | b0a491f | 2019-05-31 02:49:22 -0500 | [diff] [blame^] | 153 | |
| 154 | |
| 155 | Event Log Should Exist |
| 156 | [Documentation] Event log entries should exist. |
| 157 | |
| 158 | ${elogs}= Get Event Logs |
| 159 | Should Not Be Empty ${elogs} msg=System event log entry is not empty. |