Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/ce/strategy.rb')
-rw-r--r--qa/qa/ce/strategy.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/qa/qa/ce/strategy.rb b/qa/qa/ce/strategy.rb
index bf08f887c7d..981b60d1920 100644
--- a/qa/qa/ce/strategy.rb
+++ b/qa/qa/ce/strategy.rb
@@ -6,6 +6,16 @@ module QA
extend self
def perform_before_hooks
+ if QA::Runtime::Env.admin_personal_access_token.present?
+ QA::Resource::PersonalAccessTokenCache.set_token_for_username(QA::Runtime::User.admin_username,
+ QA::Runtime::Env.admin_personal_access_token)
+ end
+
+ if QA::Runtime::Env.personal_access_token.present? && QA::Runtime::Env.user_username.present?
+ QA::Resource::PersonalAccessTokenCache.set_token_for_username(QA::Runtime::Env.user_username,
+ QA::Runtime::Env.personal_access_token)
+ end
+
# The login page could take some time to load the first time it is visited.
# We visit the login page and wait for it to properly load only once before the tests.
QA::Runtime::Logger.info("Performing sanity check for environment!")