summaryrefslogtreecommitdiff
path: root/qa/qa/runtime/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/runtime/user.rb')
-rw-r--r--qa/qa/runtime/user.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/qa/qa/runtime/user.rb b/qa/qa/runtime/user.rb
index 60027c89ab1..c80ee6d4d96 100644
--- a/qa/qa/runtime/user.rb
+++ b/qa/qa/runtime/user.rb
@@ -3,12 +3,28 @@ module QA
module User
extend self
+ def default_name
+ 'root'
+ end
+
def name
- ENV['GITLAB_USERNAME'] || 'root'
+ Runtime::Env.user_username || default_name
end
def password
- ENV['GITLAB_PASSWORD'] || '5iveL!fe'
+ Runtime::Env.user_password || '5iveL!fe'
+ end
+
+ 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