diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-03-01 12:48:53 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-03-01 12:48:53 +0300 |
commit | be99c5da09c2847ebd4b32584aba24448a394e8b (patch) | |
tree | 0cfd2370b4ee4fb9930b93bb557ff4e8a89857f8 /internal/praefect/server_factory_test.go | |
parent | 141c3b4899804abd9d2bab26a5fe55497e54e1e8 (diff) |
testhelper: Move repository helpers into `gittest`
It's currently not possible to use our git DSL in the testhelper package
because of an import cycle between the testhelper and git package. To
fix this import cycle, we thus move test-related git helpers into the
gittest package.
This commit moves the repository helpers. As we're already touching all
sites which use these helpers anyway, it also aligns functions to have
more consistent naming.
Diffstat (limited to 'internal/praefect/server_factory_test.go')
-rw-r--r-- | internal/praefect/server_factory_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/praefect/server_factory_test.go b/internal/praefect/server_factory_test.go index 6426bb4b3..9d5783503 100644 --- a/internal/praefect/server_factory_test.go +++ b/internal/praefect/server_factory_test.go @@ -14,6 +14,7 @@ import ( "gitlab.com/gitlab-org/gitaly/client" "gitlab.com/gitlab-org/gitaly/internal/bootstrap/starter" "gitlab.com/gitlab-org/gitaly/internal/git" + "gitlab.com/gitlab-org/gitaly/internal/git/gittest" gconfig "gitlab.com/gitlab-org/gitaly/internal/gitaly/config" "gitlab.com/gitlab-org/gitaly/internal/gitaly/server" "gitlab.com/gitlab-org/gitaly/internal/gitaly/service/commit" @@ -84,7 +85,7 @@ func TestServerFactory(t *testing.T) { Failover: config.Failover{Enabled: true}, } - repo, repoPath, cleanup := testhelper.NewTestRepo(t) + repo, repoPath, cleanup := gittest.CloneRepo(t) defer cleanup() repo.StorageName = conf.VirtualStorages[0].Name // storage must be re-written to virtual to be properly redirected by praefect revision := text.ChompBytes(testhelper.MustRunCommand(t, nil, "git", "-C", repoPath, "rev-parse", "HEAD")) |