diff options
author | Nick Thomas <nick@gitlab.com> | 2019-01-18 17:54:25 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-01-31 20:14:04 +0300 |
commit | 4010b64f9a9a3308844260d5fa9e625ae44dcdfc (patch) | |
tree | 978a8b8a03298943bf8f5dc0ffd11aecc7653014 | |
parent | cda65f52092f1d68581e2d5dd3dfa674e9b9ac1e (diff) |
Move scratch data into testdata/scratch
-rw-r--r-- | internal/service/smarthttp/.gitignore | 1 | ||||
-rw-r--r-- | internal/service/smarthttp/inforefs_test.go | 2 | ||||
-rw-r--r-- | internal/service/ssh/.gitignore | 2 | ||||
-rw-r--r-- | internal/service/ssh/testhelper_test.go | 2 | ||||
-rw-r--r-- | internal/testhelper/hook_env.go | 4 |
5 files changed, 6 insertions, 5 deletions
diff --git a/internal/service/smarthttp/.gitignore b/internal/service/smarthttp/.gitignore new file mode 100644 index 000000000..3d3722967 --- /dev/null +++ b/internal/service/smarthttp/.gitignore @@ -0,0 +1 @@ +/testdata/scratch diff --git a/internal/service/smarthttp/inforefs_test.go b/internal/service/smarthttp/inforefs_test.go index 939b56826..c924d67ef 100644 --- a/internal/service/smarthttp/inforefs_test.go +++ b/internal/service/smarthttp/inforefs_test.go @@ -148,7 +148,7 @@ func TestFailureRepoNotFoundInfoRefsReceivePack(t *testing.T) { client, conn := newSmartHTTPClient(t, serverSocketPath) defer conn.Close() - repo := &gitalypb.Repository{StorageName: "default", RelativePath: "testdata/data/another_repo"} + repo := &gitalypb.Repository{StorageName: "default", RelativePath: "testdata/scratch/another_repo"} rpcRequest := &gitalypb.InfoRefsRequest{Repository: repo} ctx, cancel := context.WithCancel(context.Background()) diff --git a/internal/service/ssh/.gitignore b/internal/service/ssh/.gitignore index ace1063ab..3d3722967 100644 --- a/internal/service/ssh/.gitignore +++ b/internal/service/ssh/.gitignore @@ -1 +1 @@ -/testdata +/testdata/scratch diff --git a/internal/service/ssh/testhelper_test.go b/internal/service/ssh/testhelper_test.go index b22fd7c33..1945bf428 100644 --- a/internal/service/ssh/testhelper_test.go +++ b/internal/service/ssh/testhelper_test.go @@ -14,7 +14,7 @@ import ( ) const ( - testPath = "testdata" + testPath = "testdata/scratch" testRepoRoot = testPath + "/data" ) diff --git a/internal/testhelper/hook_env.go b/internal/testhelper/hook_env.go index b2f11449a..a8c7c3d9c 100644 --- a/internal/testhelper/hook_env.go +++ b/internal/testhelper/hook_env.go @@ -14,10 +14,10 @@ import ( // environment variables get set for hooks. func CaptureHookEnv(t *testing.T) (hookPath string, cleanup func()) { var err error - hooks.Override, err = filepath.Abs("testdata/hooks") + hooks.Override, err = filepath.Abs("testdata/scratch/hooks") require.NoError(t, err) - hookOutputFile, err := filepath.Abs("testdata/hook.env") + hookOutputFile, err := filepath.Abs("testdata/scratch/hook.env") require.NoError(t, err) require.NoError(t, os.RemoveAll(hookOutputFile)) |