summaryrefslogtreecommitdiff
path: root/qa/qa/runtime
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-08-08 19:05:13 +0200
committerRémy Coutable <remy@rymai.me>2018-08-20 10:52:24 +0200
commit98ba19b5f2c08a1c0a60be5f4137feeaa0b81f88 (patch)
tree3ed08418cf012a87a60730d3c0e88826a8b8db42 /qa/qa/runtime
parent0a630e5e3ac41b95c4ff9045668f006c9fe116c0 (diff)
downloadgitlab-ce-98ba19b5f2c08a1c0a60be5f4137feeaa0b81f88.tar.gz
[QA] Improve the fork scenario to take a username and password instead of always creating a new userqa-staging-2
Fixes https://gitlab.com/gitlab-org/quality/staging/issues/2. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'qa/qa/runtime')
-rw-r--r--qa/qa/runtime/env.rb12
-rw-r--r--qa/qa/runtime/user.rb6
2 files changed, 15 insertions, 3 deletions
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index 5dc194e0aef..841c959045f 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -39,6 +39,18 @@ module QA
ENV['GITLAB_PASSWORD']
end
+ def forker?
+ forker_username && forker_password
+ end
+
+ def forker_username
+ ENV['GITLAB_FORKER_USERNAME']
+ end
+
+ def forker_password
+ ENV['GITLAB_FORKER_PASSWORD']
+ end
+
def ldap_username
ENV['GITLAB_LDAP_USERNAME']
end
diff --git a/qa/qa/runtime/user.rb b/qa/qa/runtime/user.rb
index c80ee6d4d96..b016777c987 100644
--- a/qa/qa/runtime/user.rb
+++ b/qa/qa/runtime/user.rb
@@ -3,12 +3,12 @@ module QA
module User
extend self
- def default_name
+ def default_username
'root'
end
- def name
- Runtime::Env.user_username || default_name
+ def username
+ Runtime::Env.user_username || default_username
end
def password