test: use testing.TB as common interface

Steve Moyer created

Change summary

repository/gogit_testing.go  | 8 +-------
repository/mock_repo_test.go | 2 +-
repository/repo_testing.go   | 2 +-
3 files changed, 3 insertions(+), 9 deletions(-)

Detailed changes

repository/gogit_testing.go 🔗

@@ -9,17 +9,11 @@ import (
 	"github.com/99designs/keyring"
 )
 
-type TestingT interface {
-	Cleanup(func())
-	Helper()
-	TempDir() string
-}
-
 const namespace = "git-bug"
 
 // This is intended for testing only
 
-func CreateGoGitTestRepo(t TestingT, bare bool) TestedRepo {
+func CreateGoGitTestRepo(t testing.TB, bare bool) TestedRepo {
 	t.Helper()
 
 	dir := t.TempDir()

repository/mock_repo_test.go 🔗

@@ -5,7 +5,7 @@ import (
 )
 
 func TestMockRepo(t *testing.T) {
-	creator := func(t TestingT, bare bool) TestedRepo { return NewMockRepo() }
+	creator := func(t testing.TB, bare bool) TestedRepo { return NewMockRepo() }
 
 	RepoTest(t, creator)
 }

repository/repo_testing.go 🔗

@@ -13,7 +13,7 @@ import (
 // TODO: add tests for RepoBleve
 // TODO: add tests for RepoStorage
 
-type RepoCreator func(t TestingT, bare bool) TestedRepo
+type RepoCreator func(t testing.TB, bare bool) TestedRepo
 
 // Test suite for a Repo implementation
 func RepoTest(t *testing.T, creator RepoCreator) {