Moved "Verify IPMI Username And Password" keyword in library
Also simplified the logic to verify username and password.
Change-Id: I83551087b08331acb7c2b200db88b494d9384172
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/ipmi/test_ipmi_user.robot b/ipmi/test_ipmi_user.robot
index d51fda1..a669b26 100644
--- a/ipmi/test_ipmi_user.robot
+++ b/ipmi/test_ipmi_user.robot
@@ -18,10 +18,6 @@
${valid_password} 0penBmc1
${max_password_length} 20
${ipmi_setaccess_cmd} channel setaccess
-${IPMI_EXT_CMD} ipmitool -I lanplus -C 3
-${PASSWORD_OPTION} -P
-${USER_OPTION} -U
-${SEL_INFO_CMD} sel info
*** Test Cases ***
@@ -248,7 +244,7 @@
# Verify that disabled IPMI user is unable to run IPMI command.
${msg}= Run Keyword And Expect Error * Verify IPMI Username And Password
... ${random_username} ${valid_password}
- Should Contain ${msg} IPMI command fails
+ Should Contain ${msg} Unable to establish IPMI
Verify IPMI Root User Password Change
@@ -311,20 +307,6 @@
Verify IPMI Username And Password root ${OPENBMC_PASSWORD}
-Verify IPMI Username And Password
- [Documentation] Verify that user is able to run IPMI command
- ... with given username and password.
- [Arguments] ${username} ${password}
-
- ${ipmi_cmd}= Catenate SEPARATOR=
- ... ${IPMI_EXT_CMD}${SPACE}${USER_OPTION}${SPACE}${username}
- ... ${SPACE}${PASSWORD_OPTION}${SPACE}${password}
- ... ${SPACE}${HOST}${SPACE}${OPENBMC_HOST}${SPACE}${SEL_INFO_CMD}
- ${rc} ${output}= Run and Return RC and Output ${ipmi_cmd}
- Should Be Equal ${rc} ${0} msg=IPMI command fails
- Should Contain ${output} SEL Information
-
-
Delete All Non Root IPMI User
[Documentation] Delete all non-root IPMI user.