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/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-08-21 10:33:14 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-08-21 10:33:14 +0300
commitd5cd1c4aff0fc0022d8a57bb10e3bfa522202929 (patch)
tree129db0c3032e5ea39affdea85e118663366fd237 /qa/spec
parent92cf7e8f2493ff68000a23e5b918de533828ff64 (diff)
parent98ba19b5f2c08a1c0a60be5f4137feeaa0b81f88 (diff)
Merge branch 'qa-staging-2' into 'master'
[QA] Improve the fork scenario to take a username and password instead of always… Closes gitlab-org/quality/staging#2 See merge request gitlab-org/gitlab-ce!21090
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/runtime/env_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb
index 851026c71f0..ccc0b906845 100644
--- a/qa/spec/runtime/env_spec.rb
+++ b/qa/spec/runtime/env_spec.rb
@@ -77,6 +77,31 @@ describe QA::Runtime::Env do
end
end
+ describe '.forker?' do
+ it 'returns false if no forker credentials are defined' do
+ expect(described_class).not_to be_forker
+ end
+
+ it 'returns false if only forker username is defined' do
+ stub_env('GITLAB_FORKER_USERNAME', 'foo')
+
+ expect(described_class).not_to be_forker
+ end
+
+ it 'returns false if only forker password is defined' do
+ stub_env('GITLAB_FORKER_PASSWORD', 'bar')
+
+ expect(described_class).not_to be_forker
+ end
+
+ it 'returns true if forker username and password are defined' do
+ stub_env('GITLAB_FORKER_USERNAME', 'foo')
+ stub_env('GITLAB_FORKER_PASSWORD', 'bar')
+
+ expect(described_class).to be_forker
+ end
+ end
+
describe '.github_access_token' do
it 'returns "" if GITHUB_ACCESS_TOKEN is not defined' do
expect(described_class.github_access_token).to eq('')