From be99c5da09c2847ebd4b32584aba24448a394e8b Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Mon, 1 Mar 2021 10:48:53 +0100 Subject: 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. --- internal/git2go/apply_test.go | 2 +- internal/git2go/commit_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/git2go') diff --git a/internal/git2go/apply_test.go b/internal/git2go/apply_test.go index 6ff28c3d5..e3ed37d8c 100644 --- a/internal/git2go/apply_test.go +++ b/internal/git2go/apply_test.go @@ -16,7 +16,7 @@ import ( ) func TestExecutor_Apply(t *testing.T) { - pbRepo, repoPath, clean := testhelper.InitBareRepo(t) + pbRepo, repoPath, clean := gittest.InitBareRepo(t) defer clean() repo := localrepo.New(git.NewExecCommandFactory(config.Config), pbRepo, config.Config) diff --git a/internal/git2go/commit_test.go b/internal/git2go/commit_test.go index 6a30f071f..6e689a314 100644 --- a/internal/git2go/commit_test.go +++ b/internal/git2go/commit_test.go @@ -54,7 +54,7 @@ func TestExecutor_Commit(t *testing.T) { ctx, cancel := testhelper.Context() defer cancel() - pbRepo, repoPath, clean := testhelper.InitBareRepo(t) + pbRepo, repoPath, clean := gittest.InitBareRepo(t) defer clean() repo := localrepo.New(git.NewExecCommandFactory(config.Config), pbRepo, config.Config) -- cgit v1.2.3