1*** Settings ***
2Documentation     BMC error polling test to check errors every 10 seconds.
3
4Resource          ../lib/rest_client.robot
5Resource          ../lib/openbmc_ffdc.robot
6Resource          ../lib/resource.robot
7Resource          ../lib/boot_utils.robot
8Resource          ../lib/boot_utils.robot
9Resource          ../lib/bmc_redfish_resource.robot
10Resource          ../lib/esel_utils.robot
11
12Suite Setup      Suite Setup Execution
13Test Teardown    Post Test Case Execution
14
15*** Variables ***
16
17# Default duration and interval of test to run.
18${POLL_DURATION}  48 hours
19${POLL_INTERVAL}  10 second
20
21# Error log Severities to ignore when checking Error Logs.
22@{ESEL_IGNORE_LIST}
23...  xyz.openbmc_project.Logging.Entry.Level.Informational
24
25
26*** Test Cases ***
27
28Poll BMC For Errors
29    [Documentation]  Poll BMC for errors.
30    ...  exist.
31    [Tags]  Poll_BMC_For_Errors
32
33    Redfish.Login
34    Repeat Keyword  ${POLL_DURATION}  Perform GET Request And Check For Errors
35
36
37*** Keywords ***
38
39Perform GET Request And Check For Errors
40    [Documentation]  Check if there is any error reported.
41
42    Redfish.Get  /redfish/v1/Chassis/${CHASSIS_ID}/Sensors
43
44    Event Log Should Not Exist
45    Sleep  ${POLL_INTERVAL}
46
47
48Suite Setup Execution
49    [Documentation]  Do test setup initialization.
50
51    Should Not Be Empty
52    ...  ${OS_HOST}  msg=You must provide hostname or IP of the OS host.
53    Should Not Be Empty
54    ...  ${OS_USERNAME}  msg=You must provide OS host user name.
55    Should Not Be Empty
56    ...  ${OS_PASSWORD}  msg=You must provide OS host user password.
57
58    Redfish Power On  stack_mode=skip
59
60    Run Keyword And Ignore Error  Redfish Purge Event Log
61    Run Keyword And Ignore Error  Redfish Delete All BMC Dumps
62
63
64Post Test Case Execution
65    [Documentation]  Do the post test teardown.
66    ...  1. Capture FFDC on test failure.
67
68    FFDC On Test Case Fail
69    Redfish.Logout
70