Commit 8fad0738 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Return '/' as a bogus repo path to gitlab-shell

parent a33d5916
...@@ -59,7 +59,11 @@ module API ...@@ -59,7 +59,11 @@ module API
status: true, status: true,
gl_repository: gl_repository, gl_repository: gl_repository,
gl_username: user&.username, gl_username: user&.username,
repository_path: nil,
# This repository_path is a bogus value but gitlab-shell still requires
# its presence. https://gitlab.com/gitlab-org/gitlab-shell/issues/135
repository_path: '/',
gitaly: gitaly_payload(params[:action]) gitaly: gitaly_payload(params[:action])
} }
end end
......
...@@ -277,7 +277,7 @@ describe API::Internal do ...@@ -277,7 +277,7 @@ describe API::Internal do
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
expect(json_response["status"]).to be_truthy expect(json_response["status"]).to be_truthy
expect(json_response["repository_path"]).to be_nil expect(json_response["repository_path"]).to eq('/')
expect(json_response["gl_repository"]).to eq("wiki-#{project.id}") expect(json_response["gl_repository"]).to eq("wiki-#{project.id}")
expect(user).not_to have_an_activity_record expect(user).not_to have_an_activity_record
end end
...@@ -289,7 +289,7 @@ describe API::Internal do ...@@ -289,7 +289,7 @@ describe API::Internal do
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
expect(json_response["status"]).to be_truthy expect(json_response["status"]).to be_truthy
expect(json_response["repository_path"]).to be_nil expect(json_response["repository_path"]).to eq('/')
expect(json_response["gl_repository"]).to eq("wiki-#{project.id}") expect(json_response["gl_repository"]).to eq("wiki-#{project.id}")
expect(user).to have_an_activity_record expect(user).to have_an_activity_record
end end
...@@ -301,7 +301,7 @@ describe API::Internal do ...@@ -301,7 +301,7 @@ describe API::Internal do
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
expect(json_response["status"]).to be_truthy expect(json_response["status"]).to be_truthy
expect(json_response["repository_path"]).to be_nil expect(json_response["repository_path"]).to eq('/')
expect(json_response["gl_repository"]).to eq("project-#{project.id}") expect(json_response["gl_repository"]).to eq("project-#{project.id}")
expect(json_response["gitaly"]).not_to be_nil expect(json_response["gitaly"]).not_to be_nil
expect(json_response["gitaly"]["repository"]).not_to be_nil expect(json_response["gitaly"]["repository"]).not_to be_nil
...@@ -320,7 +320,7 @@ describe API::Internal do ...@@ -320,7 +320,7 @@ describe API::Internal do
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
expect(json_response["status"]).to be_truthy expect(json_response["status"]).to be_truthy
expect(json_response["repository_path"]).to be_nil expect(json_response["repository_path"]).to eq('/')
expect(json_response["gl_repository"]).to eq("project-#{project.id}") expect(json_response["gl_repository"]).to eq("project-#{project.id}")
expect(json_response["gitaly"]).not_to be_nil expect(json_response["gitaly"]).not_to be_nil
expect(json_response["gitaly"]["repository"]).not_to be_nil expect(json_response["gitaly"]["repository"]).not_to be_nil
......
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