Commit e5e4cd96 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab) Committed by Sean McGivern

Gitlab-workhorse still needs RepoPath on Git HTTP

parent f4ca6e9a
...@@ -21,20 +21,19 @@ module Gitlab ...@@ -21,20 +21,19 @@ module Gitlab
raise "Unsupported action: #{action}" unless ALLOWED_GIT_HTTP_ACTIONS.include?(action.to_s) raise "Unsupported action: #{action}" unless ALLOWED_GIT_HTTP_ACTIONS.include?(action.to_s)
project = repository.project project = repository.project
params = {
{
GL_ID: Gitlab::GlId.gl_id(user), GL_ID: Gitlab::GlId.gl_id(user),
GL_REPOSITORY: Gitlab::GlRepository.gl_repository(project, is_wiki), GL_REPOSITORY: Gitlab::GlRepository.gl_repository(project, is_wiki),
GL_USERNAME: user&.username, GL_USERNAME: user&.username,
ShowAllRefs: show_all_refs ShowAllRefs: show_all_refs,
} Repository: repository.gitaly_repository.to_h,
server = { RepoPath: 'ignored but not allowed to be empty in gitlab-workhorse',
address: Gitlab::GitalyClient.address(project.repository_storage), GitalyServer: {
token: Gitlab::GitalyClient.token(project.repository_storage) address: Gitlab::GitalyClient.address(project.repository_storage),
token: Gitlab::GitalyClient.token(project.repository_storage)
}
} }
params[:Repository] = repository.gitaly_repository.to_h
params[:GitalyServer] = server
params
end end
def artifact_upload_ok def artifact_upload_ok
......
...@@ -275,12 +275,14 @@ describe Gitlab::Workhorse do ...@@ -275,12 +275,14 @@ describe Gitlab::Workhorse do
describe '.git_http_ok' do describe '.git_http_ok' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:repo_path) { 'ignored but not allowed to be empty in gitlab-workhorse' }
let(:action) { 'info_refs' } let(:action) { 'info_refs' }
let(:params) do let(:params) do
{ {
GL_ID: "user-#{user.id}", GL_ID: "user-#{user.id}",
GL_USERNAME: user.username, GL_USERNAME: user.username,
GL_REPOSITORY: "project-#{project.id}", GL_REPOSITORY: "project-#{project.id}",
RepoPath: repo_path,
ShowAllRefs: false ShowAllRefs: false
} }
end end
...@@ -295,6 +297,7 @@ describe Gitlab::Workhorse do ...@@ -295,6 +297,7 @@ describe Gitlab::Workhorse do
GL_ID: "user-#{user.id}", GL_ID: "user-#{user.id}",
GL_USERNAME: user.username, GL_USERNAME: user.username,
GL_REPOSITORY: "wiki-#{project.id}", GL_REPOSITORY: "wiki-#{project.id}",
RepoPath: repo_path,
ShowAllRefs: false ShowAllRefs: false
} }
end end
......
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