Resolved field testing
Resolves openbmc/openbmc-test-automation#621
Change-Id: I1bcd989729b64f4fc9600282edbcdd37a19f69f1
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/tests/test_association.robot b/tests/test_association.robot
index 6a5e3ed..ba56890 100755
--- a/tests/test_association.robot
+++ b/tests/test_association.robot
@@ -161,6 +161,25 @@
${resp}= Get LED State XYZ cpu0_fault
Should Be Equal ${resp} ${1}
+Set Resolved Field And Verify Callout Deletion
+ [Documentation] Set the "Resolved" error log and verify callout is deleted
+ [Tags] Set_Resolved_Field_And_Verify_Callout_Deletion
+
+ Delete Error logs
+ Create Test Error With Callout
+ ${elog_entry}= Get URL List ${BMC_LOGGING_ENTRY}
+ ${resp}= OpenBMC Get Request ${elog_entry[0]}
+ ${jsondata}= To JSON ${resp.content}
+ Should Contain ${jsondata}["data"]["AdditionalData"] callout
+
+ # Set the error log field "Resolved".
+ # By doing so, the callout object should get deleted automatically.
+ ${valueDict}= Create Dictionary data=${1}
+ OpenBMC Put Request ${elog_entry[0]}/attr/Resolved data=${valueDict}
+
+ # Verify if the callout entry is deleted.
+ ${resp}= OpenBMC Get Request ${elog_entry[0]}/callout
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
*** Keywords ***