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

Make explicit that upload-pack is in Gitaly now

parent b5f4a618
......@@ -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