blob: 6655f68425e1e6b51aae4fb44fbac6cec1a470f4 [file] [log] [blame]
George Keishing8cca7fb2019-05-30 04:23:50 -05001*** Settings ***
2Documentation Inventory of hardware resources under systems.
3
4Resource ../../../lib/bmc_redfish_resource.robot
5Resource ../../../lib/bmc_redfish_utils.robot
6Resource ../../../lib/logging_utils.robot
7Resource ../../../lib/openbmc_ffdc.robot
8
George Keishingb0a491f2019-05-31 02:49:22 -05009Test Setup Test Setup Execution
George Keishing8cca7fb2019-05-30 04:23:50 -050010Test Teardown Test Teardown Execution
George Keishingb0a491f2019-05-31 02:49:22 -050011Suite Teardown Suite Teardown Execution
George Keishing8cca7fb2019-05-30 04:23:50 -050012
13*** Test Cases ***
14
15Event 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 Keishingb0a491f2019-05-31 02:49:22 -050030Event 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
43Create 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
51Test 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
65Test 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
108Test 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 Keishing8cca7fb2019-05-30 04:23:50 -0500124*** Keywords ***
125
126Suite Teardown Execution
127 [Documentation] Do the post suite teardown.
128
129 Redfish.Logout
130
131
George Keishingb0a491f2019-05-31 02:49:22 -0500132Test Setup Execution
133 [Documentation] Do test case setup tasks.
George Keishing8cca7fb2019-05-30 04:23:50 -0500134
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
141Test Teardown Execution
142 [Documentation] Do the post test teardown.
143
144 FFDC On Test Case Fail
George Keishingb0a491f2019-05-31 02:49:22 -0500145 Redfish Purge Event Log
George Keishing8cca7fb2019-05-30 04:23:50 -0500146
147
148Event 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 Keishingb0a491f2019-05-31 02:49:22 -0500153
154
155Event 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.