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:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-08-01 17:53:49 +0300
committerJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-08-01 17:53:49 +0300
commit071c1e2837a74197c32fd4a79cd0098beb8c218d (patch)
tree64243a81899c4e5ef104aa1fac8d8cd3bc981203 /internal/helper/repo_test.go
parentc3da6b177cf6b38862b1c6dd6c292cd1ee401621 (diff)
Check storage directory and fix existence test bugs
Diffstat (limited to 'internal/helper/repo_test.go')
-rw-r--r--internal/helper/repo_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/helper/repo_test.go b/internal/helper/repo_test.go
index d92886eb4..8183ba7c3 100644
--- a/internal/helper/repo_test.go
+++ b/internal/helper/repo_test.go
@@ -77,6 +77,12 @@ func TestGetRepoPath(t *testing.T) {
err: codes.InvalidArgument,
},
{
+ desc: "storage defined but storage dir does not exist",
+ storages: []config.Storage{{Name: "default", Path: "/does/not/exist"}},
+ repo: &pb.Repository{StorageName: "default", RelativePath: "foobar.git"},
+ err: codes.Internal,
+ },
+ {
desc: "relative path with directory traversal",
storages: exampleStorages,
repo: &pb.Repository{StorageName: "default", RelativePath: "../bazqux.git"},