aboutsummaryrefslogtreecommitdiffstats
path: root/entity
diff options
context:
space:
mode:
Diffstat (limited to 'entity')
-rw-r--r--entity/dag/common_test.go6
-rw-r--r--entity/dag/entity_actions_test.go12
2 files changed, 7 insertions, 11 deletions
diff --git a/entity/dag/common_test.go b/entity/dag/common_test.go
index 532e3ff8..c2177683 100644
--- a/entity/dag/common_test.go
+++ b/entity/dag/common_test.go
@@ -103,9 +103,9 @@ func makeTestContext() (repository.ClockedRepo, identity.Interface, identity.Int
}
func makeTestContextRemote(t *testing.T) (repository.ClockedRepo, repository.ClockedRepo, repository.ClockedRepo, identity.Interface, identity.Interface, identity.Resolver, Definition) {
- repoA := repository.CreateGoGitTestRepo(false)
- repoB := repository.CreateGoGitTestRepo(false)
- remote := repository.CreateGoGitTestRepo(true)
+ repoA := repository.CreateGoGitTestRepo(t, false)
+ repoB := repository.CreateGoGitTestRepo(t, false)
+ remote := repository.CreateGoGitTestRepo(t, true)
err := repoA.AddRemote("remote", remote.GetLocalRemote())
require.NoError(t, err)
diff --git a/entity/dag/entity_actions_test.go b/entity/dag/entity_actions_test.go
index 45e69c7d..68aa59b8 100644
--- a/entity/dag/entity_actions_test.go
+++ b/entity/dag/entity_actions_test.go
@@ -24,8 +24,7 @@ func allEntities(t testing.TB, bugs <-chan StreamedEntity) []*Entity {
}
func TestEntityPushPull(t *testing.T) {
- repoA, repoB, remote, id1, id2, resolver, def := makeTestContextRemote(t)
- defer repository.CleanupTestRepos(repoA, repoB, remote)
+ repoA, repoB, _, id1, id2, resolver, def := makeTestContextRemote(t)
// A --> remote --> B
e := New(def)
@@ -61,8 +60,7 @@ func TestEntityPushPull(t *testing.T) {
}
func TestListLocalIds(t *testing.T) {
- repoA, repoB, remote, id1, id2, resolver, def := makeTestContextRemote(t)
- defer repository.CleanupTestRepos(repoA, repoB, remote)
+ repoA, repoB, _, id1, id2, resolver, def := makeTestContextRemote(t)
// A --> remote --> B
e := New(def)
@@ -206,8 +204,7 @@ func assertNotEqualRefs(t *testing.T, repoA, repoB repository.RepoData, prefix s
}
func TestMerge(t *testing.T) {
- repoA, repoB, remote, id1, id2, resolver, def := makeTestContextRemote(t)
- defer repository.CleanupTestRepos(repoA, repoB, remote)
+ repoA, repoB, _, id1, id2, resolver, def := makeTestContextRemote(t)
// SCENARIO 1
// if the remote Entity doesn't exist locally, it's created
@@ -387,8 +384,7 @@ func TestMerge(t *testing.T) {
}
func TestRemove(t *testing.T) {
- repoA, repoB, remote, id1, _, resolver, def := makeTestContextRemote(t)
- defer repository.CleanupTestRepos(repoA, repoB, remote)
+ repoA, _, _, id1, _, resolver, def := makeTestContextRemote(t)
e := New(def)
e.Append(newOp1(id1, "foo"))