Pass GitalyAddress to workhorse

This commit is contained in:
Jacob Vosmaer 2017-04-04 15:41:50 +02:00
parent c5dae616c2
commit ca94d20013
2 changed files with 9 additions and 2 deletions

View File

@ -44,7 +44,12 @@ module Gitlab
raise "Unsupported action: #{action}"
end
params[:GitalySocketPath] = URI(address).path if feature_enabled
if feature_enabled
params[:GitalyAddress] = address
# TODO deprecate GitalySocketPath once GITLAB_WORKHORSE_VERSION points
# to a version that supports GitalyAddress.
params[:GitalySocketPath] = URI(address).path
end
end
params

View File

@ -188,8 +188,10 @@ describe Gitlab::Workhorse, lib: true do
context 'when Gitaly is enabled' do
let(:gitaly_params) do
address = Gitlab::GitalyClient.get_address('default')
{
GitalySocketPath: URI(Gitlab::GitalyClient.get_address('default')).path,
GitalySocketPath: URI(address).path,
GitalyAddress: address,
}
end