Added test to verify mandatory sections of error log PEL

Change-Id: I4ad9d21b2e7a247b670d017f933fb199f010d124
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/openpower/pel/test_bmc_pel.robot b/openpower/pel/test_bmc_pel.robot
index 90de51f..9fd0561 100644
--- a/openpower/pel/test_bmc_pel.robot
+++ b/openpower/pel/test_bmc_pel.robot
@@ -15,6 +15,7 @@
 ${CMD_INTERNAL_FAILURE}  busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/logging
 ...  xyz.openbmc_project.Logging.Create Create ssa{ss} xyz.openbmc_project.Common.Error.InternalFailure
 ...  xyz.openbmc_project.Logging.Entry.Level.Error 0
+@{mandatory_pel_fileds}   Private Header  User Header  Primary SRC  Extended User Header  Failing MTMS
 
 
 *** Test Cases ***
@@ -78,6 +79,20 @@
     Should Be True  ${bmc_time1_epoch} <= ${pel_time_epoch} <= ${bmc_time2_epoch}
 
 
+Verify Mandatory Sections Of Error Log PEL
+    [Documentation]  Verify mandatory sections of error log PEL.
+    [Tags]  Verify_Mandatory_Sections_Of_Error_Log_PEL
+
+    Create Test PEL Log
+
+    ${pel_ids}=  Get PEL Log Via BMC CLI
+    ${pel_id}=  Get From List  ${pel_ids}  -1
+    ${pel_output}=  Peltool  -i ${pel_id}
+    ${pel_sections}=  Get Dictionary Keys  ${pel_output}
+
+    List Should Contain Sub List  ${pel_sections}  ${mandatory_pel_fileds}
+
+
 Verify PEL Log Persistence After BMC Reboot
     [Documentation]  Verify PEL log persistence after BMC reboot.
     [Tags]  Verify_PEL_Log_Persistence_After_BMC_Reboot