Commit 66e00351 authored by James Lopez's avatar James Lopez

use GIT_PROTOCOL env variable in gitlab_shell#exec

parent 72888f59
......@@ -118,7 +118,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
self.repo_path = status.repository_path
@gl_repository = status.gl_repository
@git_protocol = status.git_protocol
@git_protocol = ENV['GIT_PROTOCOL']
@gitaly = status.gitaly
@username = status.gl_username
if defined?(@who)
......
......@@ -162,6 +162,10 @@ describe GitlabShell do
)
end
before do
allow(ENV).to receive(:[]).with('GIT_PROTOCOL').and_return(git_protocol)
end
shared_examples_for 'upload-pack' do |command|
let(:ssh_cmd) { "#{command} gitlab-ci.git" }
after { subject.exec(ssh_cmd) }
......@@ -462,7 +466,7 @@ describe GitlabShell do
'GL_ID' => gl_id,
'GL_PROTOCOL' => 'ssh',
'GL_REPOSITORY' => gl_repository,
'GL_USERNAME' => 'testuser',
'GL_USERNAME' => 'testuser'
}
end
let(:exec_options) { { unsetenv_others: true, chdir: ROOT_PATH } }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment