Fix IPMI test to handle where a system has root disabled
By default IPMI_USERNAME is root, if user decides not to use
root or a system where root is disable, this code will now handle
it to work accordingly.
Tested: robot -v OPENBMC_HOST:xx.xx.xx.xx --include Verify_IPMI_User_Deletion ipmi/test_ipmi_user.robot
- With root disabled and use admin user
- With root enabled.
Change-Id: Id42547350a722e6979c496de271657035a29cedc
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ipmi/test_ipmi_user.robot b/ipmi/test_ipmi_user.robot
index 5f2511a..5d6a593 100644
--- a/ipmi/test_ipmi_user.robot
+++ b/ipmi/test_ipmi_user.robot
@@ -654,7 +654,8 @@
... and prepares administrative user list suite variables.
Check Enabled User Count
- Determine Root User Id
+ # Skip root user checking if user decides not to use root user as default.
+ Run Keyword If '${IPMI_USERNAME}' == 'root' Determine Root User Id
Check Enabled User Count
@@ -764,4 +765,4 @@
Exit For Loop If ${is_empty} == ${True}
END
- [Return] ${random_userid}
\ No newline at end of file
+ [Return] ${random_userid}