Added test to verify error while initiating BMC dump

Changes:

    - Added a new automation test case to verify errors while
      initiating BMC dump during the dumping state.
    - Added an argument to skip BMC dump completion in create
      dump keyword

Tested:

       - Ran Verify_Error_While_Initiating_BMC_Dump_During_Dumping_State
         the test case from the sandbox successfully.

Change-Id: Ifb487a5d299d870f51ddca270f86aea02597c179
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 616b872..7571f7c 100644
--- a/redfish/managers/test_bmc_dumps.robot
+++ b/redfish/managers/test_bmc_dumps.robot
@@ -239,6 +239,19 @@
     Should Be True  0 < ${resp["AdditionalDataSizeBytes"]} < 20971520
 
 
+Verify Error While Initiating BMC Dump During Dumping State
+    [Documentation]  Verify error while initiating BMC dump during dumping state.
+    [Tags]  Verify_Error_While_Initiating_BMC_Dump_During_Dumping_State
+
+    Create User Initiated BMC Dump Via Redfish  skip_dump_creation=1
+
+    # Check error while initiating BMC dump while dump in progress.
+    ${payload}=  Create Dictionary  DiagnosticDataType=Manager
+    Redfish.Post
+    ...  /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData
+    ...  body=${payload}  valid_status_codes=[${HTTP_SERVICE_UNAVAILABLE}]
+
+
 *** Keywords ***
 
 Get BMC Dump Entries