Added test cases to add user with same name and null password

Change-Id: Iee7d5f6a206b7af5e8488a6873fb9fd90193cdbb
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/ipmi/test_ipmi_user.robot b/ipmi/test_ipmi_user.robot
index 11cbacb..0c53a5f 100644
--- a/ipmi/test_ipmi_user.robot
+++ b/ipmi/test_ipmi_user.robot
@@ -83,6 +83,36 @@
     Should Contain  ${msg}  Set User Name command failed
 
 
+Verify IPMI User Creation With Same Name
+    [Documentation]  Verify error while creating two IPMI user with same name.
+    [Tags]  Verify_IPMI_User_Creation_With_Same_Name
+
+    ${random_username}=  Generate Random String  8  [LETTERS]
+    IPMI Create User  2  ${random_username}
+
+    # Set same username for another IPMI user.
+    ${msg}=  Run Keyword And Expect Error  *  Run IPMI Standard Command
+    ...  user set name 3 ${random_username}
+    Should Contain  ${msg}  Invalid data field in request
+
+
+Verify Setting IPMI User With Null Password
+    [Documentation]  Verify error while setting IPMI user with null
+    ...  password.
+    [Tags]  Verify_Setting_IPMI_User_With_Null_Password
+
+    # Create IPMI user.
+    ${random_username}=  Generate Random String  8  [LETTERS]
+    ${random_userid}=  Evaluate  random.randint(1, 15)  modules=random
+    IPMI Create User  ${random_userid}  ${random_username}
+
+    # Set null password for newly created user.
+    ${msg}=  Run Keyword And Expect Error  *  Run IPMI Standard Command
+    ...  user set password ${random_userid} ""
+
+    Should Contain  ${msg}  Invalid data field in request
+
+
 *** Keywords ***
 
 IPMI Create User