diff options
author | Rémy Coutable <remy@rymai.me> | 2018-08-08 19:05:13 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-08-20 10:52:24 +0200 |
commit | 98ba19b5f2c08a1c0a60be5f4137feeaa0b81f88 (patch) | |
tree | 3ed08418cf012a87a60730d3c0e88826a8b8db42 /qa/qa/runtime | |
parent | 0a630e5e3ac41b95c4ff9045668f006c9fe116c0 (diff) | |
download | gitlab-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.rb | 12 | ||||
-rw-r--r-- | qa/qa/runtime/user.rb | 6 |
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 |