diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-10-20 10:55:32 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-10-26 17:01:42 +0300 |
commit | ed90d91fa0ae2108b7a3174e1f890fd72749e922 (patch) | |
tree | 470174c0018dd6b2c25710db33499685cd0e331a /cmd/gitaly-ssh | |
parent | 0ca7050be1b342394bce52f6ae63887be7954bf0 (diff) |
testhelper: Move build helpers into the testcfg package
Move build helpers from the testhelper into the testcfg package to break
the dependency on `internal/gitaly/config`. Note that packages other
than the testhelper package have no access to the global temporary test
directory, which makes it impossible to create directories shared across
tests from other packages. We thus also introduce a new helper function
`CreateGlobalDirectory()` which creates a global deterministic directory
in the shared temporary directory.
Diffstat (limited to 'cmd/gitaly-ssh')
-rw-r--r-- | cmd/gitaly-ssh/auth_test.go | 4 | ||||
-rw-r--r-- | cmd/gitaly-ssh/upload_pack_test.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cmd/gitaly-ssh/auth_test.go b/cmd/gitaly-ssh/auth_test.go index 53926aa7e..310b090d3 100644 --- a/cmd/gitaly-ssh/auth_test.go +++ b/cmd/gitaly-ssh/auth_test.go @@ -33,8 +33,8 @@ import ( func TestConnectivity(t *testing.T) { cfg, repo, _ := testcfg.BuildWithRepo(t) - testhelper.BuildGitalySSH(t, cfg) - testhelper.BuildGitalyHooks(t, cfg) + testcfg.BuildGitalySSH(t, cfg) + testcfg.BuildGitalyHooks(t, cfg) cwd, err := os.Getwd() require.NoError(t, err) diff --git a/cmd/gitaly-ssh/upload_pack_test.go b/cmd/gitaly-ssh/upload_pack_test.go index f5191285e..504f5c2e9 100644 --- a/cmd/gitaly-ssh/upload_pack_test.go +++ b/cmd/gitaly-ssh/upload_pack_test.go @@ -25,8 +25,8 @@ func TestVisibilityOfHiddenRefs(t *testing.T) { defer cancel() cfg, repo, repoPath := testcfg.BuildWithRepo(t) - testhelper.BuildGitalySSH(t, cfg) - testhelper.BuildGitalyHooks(t, cfg) + testcfg.BuildGitalySSH(t, cfg) + testcfg.BuildGitalyHooks(t, cfg) socketPath := testhelper.GetTemporaryGitalySocketFileName(t) |