aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github
diff options
context:
space:
mode:
authorSteve Moyer <smoyer1@selesy.com>2022-06-16 09:02:52 -0400
committerSteve Moyer <smoyer1@selesy.com>2022-06-16 09:02:52 -0400
commit1d4667c825bb5d291070bd4463c39a16f950f674 (patch)
tree84f1101f4cddc3804955c2c2ff90e3687c1dafee /bridge/github
parentd853a6fbc996762ab264452150558bb92bdbd6fc (diff)
downloadgit-bug-1d4667c825bb5d291070bd4463c39a16f950f674.tar.gz
refactor(809): eliminate need to defer CleanupTestRepos()
Diffstat (limited to 'bridge/github')
-rw-r--r--bridge/github/export_test.go6
-rw-r--r--bridge/github/import_integration_test.go3
-rw-r--r--bridge/github/import_test.go3
3 files changed, 4 insertions, 8 deletions
diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go
index 1d1398a9..94664853 100644
--- a/bridge/github/export_test.go
+++ b/bridge/github/export_test.go
@@ -137,8 +137,7 @@ func TestGithubPushPull(t *testing.T) {
}
// create repo backend
- repo := repository.CreateGoGitTestRepo(false)
- defer repository.CleanupTestRepos(repo)
+ repo := repository.CreateGoGitTestRepo(t, false)
backend, err := cache.NewRepoCache(repo)
require.NoError(t, err)
@@ -213,8 +212,7 @@ func TestGithubPushPull(t *testing.T) {
fmt.Printf("test repository exported in %f seconds\n", time.Since(start).Seconds())
- repoTwo := repository.CreateGoGitTestRepo(false)
- defer repository.CleanupTestRepos(repoTwo)
+ repoTwo := repository.CreateGoGitTestRepo(t, false)
// create a second backend
backendTwo, err := cache.NewRepoCache(repoTwo)
diff --git a/bridge/github/import_integration_test.go b/bridge/github/import_integration_test.go
index 3349f3f5..b969f6bd 100644
--- a/bridge/github/import_integration_test.go
+++ b/bridge/github/import_integration_test.go
@@ -32,8 +32,7 @@ func TestGithubImporterIntegration(t *testing.T) {
importer.client = &rateLimitHandlerClient{sc: clientMock}
// arrange
- repo := repository.CreateGoGitTestRepo(false)
- defer repository.CleanupTestRepos(repo)
+ repo := repository.CreateGoGitTestRepo(t, false)
backend, err := cache.NewRepoCache(repo)
require.NoError(t, err)
defer backend.Close()
diff --git a/bridge/github/import_test.go b/bridge/github/import_test.go
index 324d5421..df4989a4 100644
--- a/bridge/github/import_test.go
+++ b/bridge/github/import_test.go
@@ -24,8 +24,7 @@ func TestGithubImporter(t *testing.T) {
t.Skip("Env var GITHUB_TOKEN_PRIVATE missing")
}
- repo := repository.CreateGoGitTestRepo(false)
- defer repository.CleanupTestRepos(repo)
+ repo := repository.CreateGoGitTestRepo(t, false)
backend, err := cache.NewRepoCache(repo)
require.NoError(t, err)