Skip to content

Commit 079746b

Browse files
committed
tests: use testutil.InitRepo in setup helper
1 parent 68db6dd commit 079746b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎cmd/entire/cli/setup_test.go‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/entireio/cli/cmd/entire/cli/session"
2222
"github.com/entireio/cli/cmd/entire/cli/settings"
2323
"github.com/entireio/cli/cmd/entire/cli/strategy"
24-
"github.com/go-git/go-git/v6"
24+
"github.com/entireio/cli/cmd/entire/cli/testutil"
2525
)
2626

2727
// Note: Tests for hook manipulation functions (addHookToMatcher, hookCommandExists, etc.)
@@ -44,9 +44,7 @@ func setupTestDir(t *testing.T) string {
4444
func setupTestRepo(t *testing.T) {
4545
t.Helper()
4646
tmpDir := setupTestDir(t)
47-
if _, err := git.PlainInit(tmpDir, false); err != nil {
48-
t.Fatalf("Failed to init repo: %v", err)
49-
}
47+
testutil.InitRepo(t, tmpDir)
5048
}
5149

5250
// writeSettings writes settings content to the settings file.

0 commit comments

Comments
 (0)