Commit 0345579d authored by Nick Thomas's avatar Nick Thomas

Merge branch 'gitaly-post-upload-pack' into 'master'

Make explicit that upload-pack is in Gitaly now

See merge request !189
parents b5f4a618 8e83ac73
......@@ -40,6 +40,11 @@ func TestHandleReceivePack(t *testing.T) {
}
func testHandlePostRpc(t *testing.T, action string, handler func(*GitHttpResponseWriter, *http.Request, *api.Response) error) {
defer func(oldTesting bool) {
Testing = oldTesting
}(Testing)
Testing = true
execCommand = fakeExecCommand
defer func() { execCommand = exec.Command }()
......
......@@ -28,7 +28,8 @@ func handleUploadPack(w *GitHttpResponseWriter, r *http.Request, a *api.Response
action := getService(r)
writePostRPCHeader(w, action)
if a.GitalyServer.Address == "" {
if Testing && a.GitalyServer.Address == "" {
// This code path is no longer reachable in GitLab 10.0
err = handleUploadPackLocally(a, r, buffer, w, action)
} else {
err = handleUploadPackWithGitaly(r.Context(), a, buffer, w)
......
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