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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-11-18 18:07:25 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-11-24 10:45:54 +0300
commit3432d1c3d15817c91cd98b8e7aa72f89765b86e0 (patch)
tree00d2358bfcbe7f7c5c31dada1150dceab4bf9c4b
parent18390003bbd503da6687608ec3ee73f83bfcc9eb (diff)
server: Move "gitlab-shell" data into temporary directory
Instead of creating "gitlab-shell" in testdata, this commit moves it into the global temporary test directory.
-rw-r--r--internal/gitaly/server/auth_test.go16
1 files changed, 2 insertions, 14 deletions
diff --git a/internal/gitaly/server/auth_test.go b/internal/gitaly/server/auth_test.go
index 8a4a9046b..06fb4e4d4 100644
--- a/internal/gitaly/server/auth_test.go
+++ b/internal/gitaly/server/auth_test.go
@@ -7,7 +7,6 @@ import (
"io/ioutil"
"net"
"os"
- "path/filepath"
"testing"
"time"
@@ -310,17 +309,8 @@ func TestAuthBeforeLimit(t *testing.T) {
testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t)
defer cleanupFn()
- cwd, err := os.Getwd()
- if err != nil {
- t.Fatal(err)
- }
- gitlabShellDir := filepath.Join(cwd, "testdata", "gitlab-shell")
- os.RemoveAll(gitlabShellDir)
-
- if err := os.MkdirAll(gitlabShellDir, 0755); err != nil {
- t.Fatal(err)
- }
-
+ gitlabShellDir, cleanup := testhelper.TempDir(t)
+ defer cleanup()
config.Config.GitlabShell.Dir = gitlabShellDir
url, cleanup := testhelper.SetupAndStartGitlabServer(t, &testhelper.GitlabTestServerOptions{
@@ -353,8 +343,6 @@ func TestAuthBeforeLimit(t *testing.T) {
defer cancel()
targetRevision := "c7fbe50c7c7419d9701eebe64b1fdacc3df5b9dd"
- require.NoError(t, err)
-
inputTagName := "to-be-créated-soon"
request := &gitalypb.UserCreateTagRequest{