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
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-15 03:10:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-15 03:10:41 +0300
commitcd6194eb43ddf3df1e96dc836d06dce5f2b7c922 (patch)
tree1eb8457373ef4d53ff94499c9665fef64802bea9 /qa
parent338102393368a6775d6c59306a184f8083acc3f2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/runtime/env.rb14
-rw-r--r--qa/spec/runtime/env_spec.rb16
2 files changed, 20 insertions, 10 deletions
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index 3153c644b88..810912c7ccf 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -376,13 +376,13 @@ module QA
# Specifies the token that can be used for the GitHub API
def github_access_token
- ENV['GITHUB_ACCESS_TOKEN'].to_s.strip
+ ENV['QA_GITHUB_ACCESS_TOKEN'].to_s.strip
end
def require_github_access_token!
return unless github_access_token.empty?
- raise ArgumentError, "Please provide GITHUB_ACCESS_TOKEN"
+ raise ArgumentError, "Please provide QA_GITHUB_ACCESS_TOKEN"
end
def require_admin_access_token!
@@ -463,6 +463,16 @@ module QA
enabled?(ENV['QA_SAVE_TEST_METRICS'], default: false)
end
+ def ee_license
+ return ENV["QA_EE_LICENSE"] if ENV["QA_EE_LICENSE"]
+
+ ENV["EE_LICENSE"].tap do |license|
+ next unless license
+
+ Runtime::Logger.warn("EE_LICENSE environment variable is deprecated, please use QA_EE_LICENSE instead!")
+ end
+ end
+
def ee_activation_code
ENV['QA_EE_ACTIVATION_CODE']
end
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb
index e9c2000681b..66720937007 100644
--- a/qa/spec/runtime/env_spec.rb
+++ b/qa/spec/runtime/env_spec.rb
@@ -189,14 +189,14 @@ RSpec.describe QA::Runtime::Env do
end
describe '.github_access_token' do
- it 'returns "" if GITHUB_ACCESS_TOKEN is not defined' do
- stub_env('GITHUB_ACCESS_TOKEN', nil)
+ it 'returns "" if QA_GITHUB_ACCESS_TOKEN is not defined' do
+ stub_env('QA_GITHUB_ACCESS_TOKEN', nil)
expect(described_class.github_access_token).to eq('')
end
- it 'returns stripped string if GITHUB_ACCESS_TOKEN is defined' do
- stub_env('GITHUB_ACCESS_TOKEN', ' abc123 ')
+ it 'returns stripped string if QA_GITHUB_ACCESS_TOKEN is defined' do
+ stub_env('QA_GITHUB_ACCESS_TOKEN', ' abc123 ')
expect(described_class.github_access_token).to eq('abc123')
end
end
@@ -229,14 +229,14 @@ RSpec.describe QA::Runtime::Env do
end
describe '.require_github_access_token!' do
- it 'raises ArgumentError if GITHUB_ACCESS_TOKEN is not defined' do
- stub_env('GITHUB_ACCESS_TOKEN', nil)
+ it 'raises ArgumentError if QA_GITHUB_ACCESS_TOKEN is not defined' do
+ stub_env('QA_GITHUB_ACCESS_TOKEN', nil)
expect { described_class.require_github_access_token! }.to raise_error(ArgumentError)
end
- it 'does not raise if GITHUB_ACCESS_TOKEN is defined' do
- stub_env('GITHUB_ACCESS_TOKEN', ' abc123 ')
+ it 'does not raise if QA_GITHUB_ACCESS_TOKEN is defined' do
+ stub_env('QA_GITHUB_ACCESS_TOKEN', ' abc123 ')
expect { described_class.require_github_access_token! }.not_to raise_error
end