aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-05-27 21:14:55 +0200
committerMichael Muré <batolettre@gmail.com>2019-05-27 21:14:55 +0200
commitc7abac388aadd274d4f23f996a15f8bba90f2a92 (patch)
treeced1116de500346eb340f72b7bfc672136e40c1e /cache
parent9865dfcdf0810e288283f2ef4eba450041db32f9 (diff)
downloadgit-bug-c7abac388aadd274d4f23f996a15f8bba90f2a92.tar.gz
repo: refactor how test repo are created/cleaned
Diffstat (limited to 'cache')
-rw-r--r--cache/repo_cache_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/cache/repo_cache_test.go b/cache/repo_cache_test.go
index 8f4d47d0..7e38b6bc 100644
--- a/cache/repo_cache_test.go
+++ b/cache/repo_cache_test.go
@@ -3,12 +3,14 @@ package cache
import (
"testing"
- "github.com/MichaelMure/git-bug/util/test"
"github.com/stretchr/testify/require"
+
+ "github.com/MichaelMure/git-bug/repository"
)
func TestCache(t *testing.T) {
- repo := test.CreateRepo(false)
+ repo := repository.CreateTestRepo(false)
+ defer repository.CleanupTestRepos(t, repo)
cache, err := NewRepoCache(repo)
require.NoError(t, err)
@@ -101,8 +103,8 @@ func TestCache(t *testing.T) {
}
func TestPushPull(t *testing.T) {
- repoA, repoB, remote := test.SetupReposAndRemote(t)
- defer test.CleanupRepos(repoA, repoB, remote)
+ repoA, repoB, remote := repository.SetupReposAndRemote(t)
+ defer repository.CleanupTestRepos(t, repoA, repoB, remote)
cacheA, err := NewRepoCache(repoA)
require.NoError(t, err)