diff options
author | Stan Hu <stanhu@gmail.com> | 2018-02-14 21:27:06 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-02-14 21:27:06 -0800 |
commit | 07b6ad351a966eed6ed4ae60145def2d8ab60ac7 (patch) | |
tree | 7c1f9d642a40a604fa8cb69788f6a51f2cee8de6 /qa | |
parent | dd633bc1888453a07474d045eca91a9e66302ce0 (diff) | |
download | gitlab-ce-07b6ad351a966eed6ed4ae60145def2d8ab60ac7.tar.gz |
Add LDAP_USERNAME and LDAP_PASSWORD user environment variables for QAsh-add-env-variables-for-ldap-qa
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/main/login.rb | 4 | ||||
-rw-r--r-- | qa/qa/runtime/env.rb | 8 | ||||
-rw-r--r-- | qa/qa/runtime/user.rb | 8 |
3 files changed, 18 insertions, 2 deletions
diff --git a/qa/qa/page/main/login.rb b/qa/qa/page/main/login.rb index a8a5601dbe6..596205fe540 100644 --- a/qa/qa/page/main/login.rb +++ b/qa/qa/page/main/login.rb @@ -53,8 +53,8 @@ module QA click_link 'LDAP' - fill_in :username, with: Runtime::User.name - fill_in :password, with: Runtime::User.password + fill_in :username, with: Runtime::User.ldap_username + fill_in :password, with: Runtime::User.ldap_password click_button 'Sign in' end end diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb index 5401372e225..fe432edfa2a 100644 --- a/qa/qa/runtime/env.rb +++ b/qa/qa/runtime/env.rb @@ -35,6 +35,14 @@ module QA ENV['GITLAB_PASSWORD'] end + def ldap_username + ENV['GITLAB_LDAP_USERNAME'] + end + + def ldap_password + ENV['GITLAB_LDAP_PASSWORD'] + end + def sandbox_name ENV['GITLAB_SANDBOX_NAME'] end diff --git a/qa/qa/runtime/user.rb b/qa/qa/runtime/user.rb index ecc9ab321ba..c80ee6d4d96 100644 --- a/qa/qa/runtime/user.rb +++ b/qa/qa/runtime/user.rb @@ -18,6 +18,14 @@ module QA def ldap_user? Runtime::Env.user_type == 'ldap' end + + def ldap_username + Runtime::Env.ldap_username || name + end + + def ldap_password + Runtime::Env.ldap_password || password + end end end end |