Error log delete use cases
Added the following:
1. Create a test error log and delete it
2. Create multiple test error logs and delete them
3. Create two test error logs and delete one
4. Added Keyword "Delete Error Logs And Verify"
Resolves openbmc/openbmc-test-automation#562
Change-Id: Ic4645be5be61ab98e353180c6d21438a17372b35
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/extended/test_error_log.robot b/extended/test_error_log.robot
index 6c657f5..9efee7e 100644
--- a/extended/test_error_log.robot
+++ b/extended/test_error_log.robot
@@ -113,8 +113,38 @@
# for every error and in increasing time stamp.
${time_stamp1}= Read Attribute ${BMC_LOGGING_ENTRY}${1} Timestamp
${time_stamp2}= Read Attribute ${BMC_LOGGING_ENTRY}${2} Timestamp
- Should Be True ${time_stamp2} > ${time_stamp1}
+ Should Be True ${time_stamp2} > ${time_stamp1}
+Create Test Error Log And Delete
+ [Documentation] Create an error log and delete it.
+ [Tags] Create_Test_Error_Log_And_Delete
+
+ Delete Error Logs And Verify
+ Create Test Error Log
+ Delete Error Logs And Verify
+
+Create Multiple Test Error Logs And Delete All
+ [Documentation] Create multiple error logs and delete all.
+ [Tags] Create_Multiple_Test_Error_Logs_And_Delete_All
+
+ Delete Error Logs And Verify
+ Create Test Error Log
+ Create Test Error Log
+ Create Test Error Log
+ Delete Error Logs And Verify
+
+Create Two Test Error Logs And Delete One
+ [Documentation] Create two error logs and delete the first entry.
+ [Tags] Create_Two_Test_Error_Logs_And_Delete_One
+
+ Delete Error Logs And Verify
+ Create Test Error Log
+ ${entry_id}= Read Attribute ${BMC_LOGGING_ENTRY}${1} Id
+ Create Test Error Log
+ Delete Error log Entry ${BMC_LOGGING_ENTRY}/${entry_id}
+ ${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}/${entry_id}
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
+ Delete Error Logs And Verify
*** Keywords ***
@@ -156,10 +186,16 @@
Verify Test Error Log
[Documentation] Verify test error log entries.
- ${content}= Read Attribute ${BMC_LOGGING_ENTRY}${1} Message
- Should Be Equal ${content}
+ ${entry_id}= Read Attribute ${BMC_LOGGING_ENTRY}${1} Message
+ Should Be Equal ${entry_id}
... example.xyz.openbmc_project.Example.Elog.AutoTestSimple
- ${content}= Read Attribute ${BMC_LOGGING_ENTRY}${1} Severity
- Should Be Equal ${content}
+ ${entry_id}= Read Attribute ${BMC_LOGGING_ENTRY}${1} Severity
+ Should Be Equal ${entry_id}
... xyz.openbmc_project.Logging.Entry.Level.Error
+Delete Error Logs And Verify
+ [Documentation] Delete all error logs and verify.
+
+ Delete Error logs
+ ${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}/list
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}