Fixed code when run LDAP on secure
Change-Id: I9277cffcdbb85fdbcf4096094556b3354f7b8bba
Signed-off-by: Anves Kumar rayankula <anvesr77@in.ibm.com>
diff --git a/gui/gui_test/access_control/test_obmc_gui_ldap.robot b/gui/gui_test/access_control/test_obmc_gui_ldap.robot
index ee05cc8..f12e73f 100644
--- a/gui/gui_test/access_control/test_obmc_gui_ldap.robot
+++ b/gui/gui_test/access_control/test_obmc_gui_ldap.robot
@@ -4,9 +4,8 @@
Resource ../../lib/gui_resource.robot
-Suite Setup Launch Browser And Login GUI
+Suite Setup Suite Setup Execution
Suite Teardown Close Browser
-Test Setup Test Setup Execution
*** Variables ***
@@ -68,7 +67,7 @@
[Documentation] Verify LDAP configurations are editable.
[Tags] Verify_LDAP_Configurations_Editable
- Create LDAP Configuration ${LDAP_SERVER_URI} ${LDAP_TYPE} ${LDAP_BIND_DN}
+ Create LDAP Configuration ${LDAP_SERVER_URI} ${LDAP_TYPE} ${LDAP_BIND_DN}
... ${LDAP_BIND_DN_PASSWORD} ${LDAP_BASE_DN}
Wait Until Page Contains Element ${xpath_ldap_url}
Textfield Value Should Be ${xpath_ldap_url} ${LDAP_SERVER_URI}
@@ -84,7 +83,7 @@
Create LDAP Configuration
Get LDAP Configuration ${LDAP_TYPE}
- Redfish.Logut
+ Redfish.Logout
Redfish.Login ${LDAP_USER} ${LDAP_USER_PASSWORD}
@@ -94,7 +93,7 @@
[Teardown] Run Keywords Redfish.Logout AND Redfish.Login
Create LDAP Configuration ${incorrect_ip} ${LDAP_TYPE} ${LDAP_BIND_DN}
- ... ${LDAP_BIND_DN_PASSWORD} ${LDAP_BASE_DN}
+ ... ${LDAP_BIND_DN_PASSWORD} ${LDAP_BASE_DN} ${LDAP_MODE}
Get LDAP Configuration ${LDAP_TYPE}
Redfish.Logout
@@ -131,21 +130,34 @@
*** Keywords ***
-Test Setup Execution
+Suite Setup Execution
[Documentation] Do test case setup tasks.
+ Launch Browser And Login GUI
+
# Navigate to https://xx.xx.xx.xx/#/access-control/ldap LDAP page.
Click Element ${xpath_access_control_menu}
Click Element ${xpath_ldap_sub_menu}
Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain ldap
+ Valid Value LDAP_TYPE valid_values=["ActiveDirectory", "LDAP"]
+ Valid Value LDAP_USER
+ Valid Value LDAP_USER_PASSWORD
+ Valid Value GROUP_PRIVILEGE
+ Valid Value GROUP_NAME
+ Valid Value LDAP_SERVER_URI
+ Valid Value LDAP_BIND_DN_PASSWORD
+ Valid Value LDAP_BIND_DN
+ Valid Value LDAP_BASE_DN
+ Valid Value LDAP_MODE valid_values=["secure", "nonsecure"]
+
Create LDAP Configuration
[Documentation] Create LDAP configuration.
[Arguments] ${ldap_server_uri}=${LDAP_SERVER_URI} ${ldap_servicetype}=${LDAP_TYPE}
... ${ldap_bind_dn}=${LDAP_BIND_DN} ${ldap_bind_dn_password}=${LDAP_BIND_DN_PASSWORD}
- ... ${ldap_base_dn}=${LDAP_BASE_DN}
+ ... ${ldap_base_dn}=${LDAP_BASE_DN} ${ldap_mode}=${LDAP_MODE}
# Description of argument(s):
# ldap_server_uri LDAP server uri (e.g. ldap://XX.XX.XX.XX).
@@ -163,6 +175,10 @@
... ELSE Click Element At Coordinates ${radio_buttons}[${1}] 0 0
Wait Until Page Contains Element ${xpath_ldap_url}
+ Run Keyword If '${ldap_mode}' == 'secure'
+ ... Click Element At Coordinates ${xpath_secure_ldap_checkbox} 0 0
+ ... ELSE Unselect Checkbox ${xpath_secure_ldap_checkbox}
+
Input Text ${xpath_ldap_url} ${ldap_server_uri}
Input Text ${xpath_ldap_bind_dn} ${ldap_bind_dn}
Input Text ${xpath_ldap_password} ${ldap_bind_dn_password}