diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-15 09:09:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-15 09:09:35 +0300 |
commit | 458af51866708509781619ba1ead051f4b80cb63 (patch) | |
tree | a352cd03566a1356c5689f22a337ff27fa6fd036 /qa/spec | |
parent | 6ed45110539553d7154c874bc94fbac4c24b46be (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/spec')
-rw-r--r-- | qa/spec/support/ssh_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/qa/spec/support/ssh_spec.rb b/qa/spec/support/ssh_spec.rb index f4d382f8adc..2edff824fd6 100644 --- a/qa/spec/support/ssh_spec.rb +++ b/qa/spec/support/ssh_spec.rb @@ -26,6 +26,16 @@ RSpec.describe QA::Support::SSH do end end + context 'when no port specified in https uri' do + let(:uri) { 'https://foo.com' } + + it 'does not provide port in ssh command' do + expect(ssh).to receive(:run).with(expected_ssh_command_no_port, any_args).and_return(result) + + call_method + end + end + context 'when port 80 specified in uri' do let(:uri) { 'http://foo.com:80' } @@ -86,6 +96,18 @@ RSpec.describe QA::Support::SSH do end end + context 'when running on a review app in CI' do + let(:uri) { 'https://gitlab-review.app' } + + before do + allow(QA::Runtime::Env).to receive(:running_in_ci?).and_return(true) + end + + it 'returns git user' do + expect(ssh.send(:git_user)).to eq('git') + end + end + context 'when running against environment on a port other than 80 or 443' do let(:uri) { 'http://localhost:3000' } |