Added test case to verify error log and dump creation for internal error

Changes:

       -  Added a new automation test case to verify error log and BMC
          dump creation for internal failure.

Tested:

       - Ran the test case from sandbox successfully.

Change-Id: I84428c8535428a4c5f447ca11873ab56d90803d0
Signed-off-by: manashsarma <manashsarma@in.ibm.com>
diff --git a/redfish/managers/test_bmc_dumps.robot b/redfish/managers/test_bmc_dumps.robot
index ed8d947..0e212b2 100644
--- a/redfish/managers/test_bmc_dumps.robot
+++ b/redfish/managers/test_bmc_dumps.robot
@@ -360,6 +360,28 @@
     Should Be Equal As Integers  ${length}  ${1}
 
 
+Verify Error Log And Dump For Internal Failure
+    [Documentation]  Verify error log and dump for internal failure.
+    [Tags]  Verify_Error_Log_And_Dump_For_Internal_Failure
+
+    Redfish Purge Event Log
+    Redfish Delete All BMC Dumps
+
+    # Create an internal failure error log.
+    BMC Execute Command  ${CMD_INTERNAL_FAILURE}
+
+    # With internal failure, an error log file is generated. Check if
+    # BMC has only one error log for this internal failure.
+    ${resp}=  Redfish.Get  /redfish/v1/Systems/system/LogServices/CELog/Entries
+    Should Be True  ${resp.dict["Members@odata.count"]} == ${1}
+
+    # Wait for the BMC dump to become available and verify its presence.
+    Wait Until Keyword Succeeds  2 min  10 sec  Is BMC Dump Available
+    ${dump_entries}=  Get BMC Dump Entries
+    ${length}=  Get length  ${dump_entries}
+    Should Be Equal As Integers  ${length}  ${1}
+
+
 *** Keywords ***
 
 Get BMC Dump Entries