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/runtime/env.rb')
-rw-r--r--qa/qa/runtime/env.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index b1a912ac43e..782ba1cf2fa 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -29,6 +29,15 @@ module QA
@gitlab_url ||= ENV["QA_GITLAB_URL"] || "http://127.0.0.1:3000" # default to GDK
end
+ # Retrieves the value of the gitlab_canary cookie if set or returns an empty hash.
+ #
+ # @return [Hash]
+ def canary_cookie
+ canary = ENV['QA_COOKIES']&.scan(/gitlab_canary=(true|false)/)&.dig(0, 0)
+
+ canary ? { gitlab_canary: canary } : {}
+ end
+
def additional_repository_storage
ENV['QA_ADDITIONAL_REPOSITORY_STORAGE']
end