summaryrefslogtreecommitdiff
path: root/qa/qa/page
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-02-10 14:20:44 -0800
committerStan Hu <stanhu@gmail.com>2018-02-11 05:59:33 -0800
commitdc8cf732078dc03af52e4821683ea1c04946091e (patch)
treee650e989b486fc09dc1ab100087600f2206fcb92 /qa/qa/page
parent498ade4801a822f8704390b10d178af9fe7987cb (diff)
downloadgitlab-ce-dc8cf732078dc03af52e4821683ea1c04946091e.tar.gz
GitLab QA: Add GITLAB_USER_TYPE to support different login types (e.g. standard, LDAP)sh-add-login-types-qa
GITLAB_USERNAME and GITLAB_PASSWORD may be specified for an LDAP login, but QA scenarios may need to know which type it is in order to log in successfully.
Diffstat (limited to 'qa/qa/page')
-rw-r--r--qa/qa/page/main/login.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/qa/qa/page/main/login.rb b/qa/qa/page/main/login.rb
index fd49b27cb1a..a8a5601dbe6 100644
--- a/qa/qa/page/main/login.rb
+++ b/qa/qa/page/main/login.rb
@@ -39,6 +39,14 @@ module QA
end
end
+ def sign_in_using_credentials
+ if Runtime::User.ldap_user?
+ sign_in_using_ldap_credentials
+ else
+ sign_in_using_gitlab_credentials
+ end
+ end
+
def sign_in_using_ldap_credentials
using_wait_time 0 do
set_initial_password_if_present
@@ -51,7 +59,7 @@ module QA
end
end
- def sign_in_using_credentials
+ def sign_in_using_gitlab_credentials
using_wait_time 0 do
set_initial_password_if_present