diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2018-05-25 13:45:29 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2018-05-25 13:58:22 +0200 |
commit | 8fad07383ada021fc995294fd0fe0f77fe37da35 (patch) | |
tree | b4614086a5354d3e83751a28af55f069fc7504ce | |
parent | a33d591602b40d224b4fdb74300e3b0d96bda7df (diff) | |
download | gitlab-ce-zj-internal-repo-path.tar.gz |
Return '/' as a bogus repo path to gitlab-shellzj-internal-repo-path
-rw-r--r-- | lib/api/internal.rb | 6 | ||||
-rw-r--r-- | spec/requests/api/internal_spec.rb | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index 798a8dbb929..a41270fa85f 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -59,7 +59,11 @@ module API status: true, gl_repository: gl_repository, 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]) } end diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 506901095f1..5dc3ddd4b36 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -277,7 +277,7 @@ describe API::Internal do expect(response).to have_gitlab_http_status(200) 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(user).not_to have_an_activity_record end @@ -289,7 +289,7 @@ describe API::Internal do expect(response).to have_gitlab_http_status(200) 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(user).to have_an_activity_record end @@ -301,7 +301,7 @@ describe API::Internal do expect(response).to have_gitlab_http_status(200) 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["gitaly"]).not_to be_nil expect(json_response["gitaly"]["repository"]).not_to be_nil @@ -320,7 +320,7 @@ describe API::Internal do expect(response).to have_gitlab_http_status(200) 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["gitaly"]).not_to be_nil expect(json_response["gitaly"]["repository"]).not_to be_nil |