Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-10-04 16:25:57 +0300
committerJames Lopez <james@jameslopez.es>2018-10-04 16:25:57 +0300
commit38de6cdd54f92326d10d587498b7aed80e9e2e91 (patch)
tree2d3c6ea2d61761781e4ad4bcf3ec7660221e3857
parent24d12bb26e625b5fc3f21f144d99d7b6d9a1fc07 (diff)
fix test
-rw-r--r--internal/service/smarthttp/upload_pack_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/service/smarthttp/upload_pack_test.go b/internal/service/smarthttp/upload_pack_test.go
index bdb437f51..7f64ba669 100644
--- a/internal/service/smarthttp/upload_pack_test.go
+++ b/internal/service/smarthttp/upload_pack_test.go
@@ -158,7 +158,16 @@ func TestUploadPackRequestWithGitProtocol(t *testing.T) {
server, serverSocketPath := runSmartHTTPServer(t)
defer server.Stop()
+ testRepo := testhelper.TestRepository()
+ testRepoPath, err := helper.GetRepoPath(testRepo)
+ require.NoError(t, err)
+
+ storagePath := testhelper.GitlabTestStoragePath()
remoteRepoRelativePath := "gitlab-test-remote"
+ remoteRepoPath := path.Join(storagePath, remoteRepoRelativePath)
+ // Make a non-bare clone of the test repo to act as a remote one
+ testhelper.MustRunCommand(t, nil, "git", "clone", testRepoPath, remoteRepoPath)
+ defer os.RemoveAll(remoteRepoPath)
requestBody := &bytes.Buffer{}
@@ -179,7 +188,7 @@ func TestUploadPackRequestWithGitProtocol(t *testing.T) {
}
// The ref is successfully requested as it is not hidden
- _, err := makePostUploadPackRequest(t, serverSocketPath, rpcRequest, requestBody)
+ _, err = makePostUploadPackRequest(t, serverSocketPath, rpcRequest, requestBody)
require.NoError(t, err)
envData := testhelper.GetGitEnvData()