aboutsummaryrefslogtreecommitdiffstats
path: root/bug
diff options
context:
space:
mode:
Diffstat (limited to 'bug')
-rw-r--r--bug/bug_actions_test.go21
-rw-r--r--bug/operation_test.go9
2 files changed, 17 insertions, 13 deletions
diff --git a/bug/bug_actions_test.go b/bug/bug_actions_test.go
index e35a7ece..4bc58aea 100644
--- a/bug/bug_actions_test.go
+++ b/bug/bug_actions_test.go
@@ -4,14 +4,15 @@ import (
"testing"
"time"
- "github.com/MichaelMure/git-bug/identity"
- "github.com/MichaelMure/git-bug/util/test"
"github.com/stretchr/testify/require"
+
+ "github.com/MichaelMure/git-bug/identity"
+ "github.com/MichaelMure/git-bug/repository"
)
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)
reneA := identity.NewIdentity("René Descartes", "rene@descartes.fr")
@@ -83,8 +84,8 @@ func BenchmarkRebaseTheirs(b *testing.B) {
}
func _RebaseTheirs(t testing.TB) {
- 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)
reneA := identity.NewIdentity("René Descartes", "rene@descartes.fr")
@@ -156,8 +157,8 @@ func BenchmarkRebaseOurs(b *testing.B) {
}
func _RebaseOurs(t testing.TB) {
- 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)
reneA := identity.NewIdentity("René Descartes", "rene@descartes.fr")
@@ -245,8 +246,8 @@ func BenchmarkRebaseConflict(b *testing.B) {
}
func _RebaseConflict(t testing.TB) {
- 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)
reneA := identity.NewIdentity("René Descartes", "rene@descartes.fr")
diff --git a/bug/operation_test.go b/bug/operation_test.go
index f9a7d191..0ddb61c2 100644
--- a/bug/operation_test.go
+++ b/bug/operation_test.go
@@ -4,11 +4,11 @@ import (
"testing"
"time"
+ "github.com/stretchr/testify/require"
+
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
"github.com/MichaelMure/git-bug/util/git"
- "github.com/MichaelMure/git-bug/util/test"
- "github.com/stretchr/testify/require"
)
func TestValidate(t *testing.T) {
@@ -80,9 +80,12 @@ func TestMetadata(t *testing.T) {
}
func TestHash(t *testing.T) {
+ repo := repository.CreateTestRepo(false)
+ defer repository.CleanupTestRepos(t, repo)
+
repos := []repository.ClockedRepo{
repository.NewMockRepoForTest(),
- test.CreateRepo(false),
+ repo,
}
for _, repo := range repos {