Move tests from the error log suite to the IPMI suite
Changes:
- Created a new keyword
- Below test case moved to test_ipmi_sel.robot
Verify_IPMI_SEL_Event_Last_Add_Time
Delete Non-Existing SEL Event Entry
Delete Invalid SEL Event Entry
- Removed above test cases from test_event_logging.robot
Tested:
- Ran and tested on BMC Environment.
Change-Id: I5db573687ed551e533c6b641ea1891da90e8d0d6
Signed-off-by: Vidya-Kalasappanavar <Vidya.Kalasappanavar@ibm.com>
diff --git a/ipmi/test_ipmi_sel.robot b/ipmi/test_ipmi_sel.robot
index 4e4f7e2..434843b 100644
--- a/ipmi/test_ipmi_sel.robot
+++ b/ipmi/test_ipmi_sel.robot
@@ -3,7 +3,11 @@
Documentation Module to test IPMI SEL functionality.
Resource ../lib/ipmi_client.robot
Resource ../lib/openbmc_ffdc.robot
+Resource ../../../lib/logging_utils.robot
+
Library ../lib/ipmi_utils.py
+Library ../../../lib/logging_utils.py
+
Variables ../data/ipmi_raw_cmd_table.py
Test Setup Test Setup Execution
@@ -281,6 +285,48 @@
Should Contain ${clear_resp} ${IPMI_RAW_CMD['SEL_entry']['Clear_SEL'][4]}
+Delete Non Existing SEL Event Entry
+ [Documentation] Delete non existing SEL event entry.
+ [Tags] Delete_Non_Existing_SEL_Event_Entry
+
+ ${sel_delete}= Run Keyword And Expect Error *
+ ... Run IPMI Standard Command sel delete 100
+ Should Contain ${sel_delete} Unable to delete entry
+ ... case_insensitive=True
+
+
+Delete Invalid SEL Event Entry
+ [Documentation] Delete invalid SEL event entry.
+ [Tags] Delete_Invalid_SEL_Event_Entry
+
+ ${sel_delete}= Run Keyword And Expect Error *
+ ... Run IPMI Standard Command sel delete abc
+ Should Contain ${sel_delete} Given SEL ID 'abc' is invalid
+ ... case_insensitive=True
+
+
+Verify IPMI SEL Event Last Add Time
+ [Documentation] Verify IPMI SEL's last added timestamp.
+ [Tags] Verify_IPMI_SEL_Event_Last_Add_Time
+ [Setup] Install Tarball For Error Creation
+
+ Create Test Error Log
+ ${sel_time}= Run IPMI Standard Command sel time get
+ ${sel_time}= Convert Date ${sel_time}
+ ... date_format=%m/%d/%Y %H:%M:%S exclude_millis=True
+
+ ${sel_last_add_time}= Get IPMI SEL Setting Last Add Time
+ ${sel_last_add_time}= Convert Date ${sel_last_add_time}
+ ... date_format=%m/%d/%Y %H:%M:%S exclude_millis=True
+
+ ${time_diff}=
+ ... Subtract Date From Date ${sel_last_add_time} ${sel_time}
+
+ # Verify if the delay in current time check and last add SEL time
+ # is less or equals to 2 seconds.
+ Should Be True ${time_diff} <= 2
+
+
*** Keywords ***
Create User Defined SEL
@@ -366,6 +412,13 @@
[Return] ${epoch_date}
+Install Tarball For Error Creation
+ [Documentation] Install tarball for error log creation.
+
+ ${status}= Run Keyword And Return Status Logging Test Binary Exist
+ Run Keyword If ${status} == ${False} Install Tarball
+
+
Test Setup Execution
[Documentation] Do test setup tasks.
diff --git a/redfish/systems/eventlog/test_event_logging.robot b/redfish/systems/eventlog/test_event_logging.robot
index 42136d3..5fadb34 100644
--- a/redfish/systems/eventlog/test_event_logging.robot
+++ b/redfish/systems/eventlog/test_event_logging.robot
@@ -256,26 +256,6 @@
... case_insensitive=True
-Delete Non Existing SEL Event Entry
- [Documentation] Delete non existing SEL event entry.
- [Tags] Delete_Non_Existing_SEL_Event_Entry
-
- ${sel_delete}= Run Keyword And Expect Error *
- ... Run IPMI Standard Command sel delete 100
- Should Contain ${sel_delete} Unable to delete entry
- ... case_insensitive=True
-
-
-Delete Invalid SEL Event Entry
- [Documentation] Delete invalid SEL event entry.
- [Tags] Delete_Invalid_SEL_Event_Entry
-
- ${sel_delete}= Run Keyword And Expect Error *
- ... Run IPMI Standard Command sel delete abc
- Should Contain ${sel_delete} Given SEL ID 'abc' is invalid
- ... case_insensitive=True
-
-
Verify IPMI SEL Event Entries
[Documentation] Verify IPMI SEL's entries info.
[Tags] Verify_IPMI_SEL_Event_Entries
@@ -288,27 +268,6 @@
Should Be Equal As Strings ${sel_entries_count} ${count}
-Verify IPMI SEL Event Last Add Time
- [Documentation] Verify IPMI SEL's last added timestamp.
- [Tags] Verify_IPMI_SEL_Event_Last_Add_Time
-
- Create Test Error Log
- ${sel_time}= Run IPMI Standard Command sel time get
- ${sel_time}= Convert Date ${sel_time}
- ... date_format=%m/%d/%Y %H:%M:%S exclude_millis=True
-
- ${sel_last_add_time}= Get IPMI SEL Setting Last Add Time
- ${sel_last_add_time}= Convert Date ${sel_last_add_time}
- ... date_format=%m/%d/%Y %H:%M:%S exclude_millis=True
-
- ${time_diff}=
- ... Subtract Date From Date ${sel_last_add_time} ${sel_time}
-
- # Verify if the delay in current time check and last add SEL time
- # is less or equals to 2 seconds.
- Should Be True ${time_diff} <= 2
-
-
Create Test Event Log And Delete
[Documentation] Create an event log and delete it.
[Tags] Create_Test_Event_Log_And_Delete