summaryrefslogtreecommitdiff
path: root/qa/qa/runtime/env.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/runtime/env.rb')
-rw-r--r--qa/qa/runtime/env.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index 56944e8b641..fe432edfa2a 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -16,6 +16,36 @@ module QA
def personal_access_token
ENV['PERSONAL_ACCESS_TOKEN']
end
+
+ # By default, "standard" denotes a standard GitLab user login.
+ # Set this to "ldap" if the user should be logged in via LDAP.
+ def user_type
+ (ENV['GITLAB_USER_TYPE'] || 'standard').tap do |type|
+ unless %w(ldap standard).include?(type)
+ raise ArgumentError.new("Invalid user type '#{type}': must be 'ldap' or 'standard'")
+ end
+ end
+ end
+
+ def user_username
+ ENV['GITLAB_USERNAME']
+ end
+
+ def user_password
+ 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
end
end
end