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/spec | |
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/spec')
-rw-r--r-- | qa/spec/runtime/env_spec.rb | 25 |
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('') |