Skip operator user based on SKIP_OPERATOR_USER value
Changes:
- Added a logic to skip operator user based on
SKIP_OPERATOR_USER value
Tested:
- Ran test_sessions_management.robot suite from sandbox
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
Change-Id: I033c7575f519bf6492ea2858876bfda48f55f838
diff --git a/redfish/service_root/test_sessions_management.robot b/redfish/service_root/test_sessions_management.robot
index 60a7514..718cb25 100644
--- a/redfish/service_root/test_sessions_management.robot
+++ b/redfish/service_root/test_sessions_management.robot
@@ -17,7 +17,9 @@
@{ADMIN} admin_user TestPwd123
@{OPERATOR} operator_user TestPwd123
-&{USERS} Administrator=${ADMIN} Operator=${OPERATOR}
+# User-driven input parameter to skip operator user.
+# -v SKIP_OPERATOR_USER:1 to skip from CLI.
+${SKIP_OPERATOR_USER} ${0}
*** Test Cases ***
@@ -275,6 +277,14 @@
[Documentation] Suite Setup Execution.
Redfish.Login
+
+ # Skip operator user if SKIP_OPERATOR_USER is 1.
+ Run Keyword If
+ ... ${SKIP_OPERATOR_USER} == ${1}
+ ... Set Suite Variable &{USERS} Administrator=${ADMIN}
+ ... ELSE
+ ... Set Suite Variable &{USERS} Administrator=${ADMIN} Operator=${OPERATOR}
+
Create Users With Different Roles users=${USERS} force=${True}
Get Default Timeout Value