aboutsummaryrefslogtreecommitdiffstats
path: root/entity
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 /entity
parentd853a6fbc996762ab264452150558bb92bdbd6fc (diff)
downloadgit-bug-1d4667c825bb5d291070bd4463c39a16f950f674.tar.gz
refactor(809): eliminate need to defer CleanupTestRepos()
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"))