@@ -10,34 +10,31 @@ import (
10
10
"sync"
11
11
"testing"
12
12
13
+ fixtures "github.com/src-d/go-git-fixtures"
14
+ "github.com/src-d/go-mysql-server/sql"
15
+ "github.com/src-d/go-mysql-server/sql/plan"
13
16
"github.com/stretchr/testify/require"
14
17
sivafs "gopkg.in/src-d/go-billy-siva.v4"
15
18
billy "gopkg.in/src-d/go-billy.v4"
16
19
"gopkg.in/src-d/go-billy.v4/osfs"
17
- fixtures "gopkg.in/src-d/go-git-fixtures.v3"
18
20
git "gopkg.in/src-d/go-git.v4"
19
21
"gopkg.in/src-d/go-git.v4/plumbing/cache"
20
22
"gopkg.in/src-d/go-git.v4/storage/filesystem"
21
- "github.com/src-d/go-mysql-server/sql"
22
- "github.com/src-d/go-mysql-server/sql/plan"
23
23
)
24
24
25
25
type CleanupFunc func ()
26
26
27
27
func setup (t * testing.T ) (* sql.Context , string , CleanupFunc ) {
28
28
require := require .New (t )
29
29
t .Helper ()
30
- require .NoError (fixtures .Init ())
31
30
fxs := []* fixtures.Fixture {fixtures .ByTag ("worktree" ).One ()}
32
31
ctx , paths , cleanup := buildSession (t , fxs )
33
32
require .Len (paths , 1 )
34
33
return ctx , paths [0 ], cleanup
35
34
}
36
35
37
36
func setupRepos (t * testing.T ) (* sql.Context , []string , CleanupFunc ) {
38
- require := require .New (t )
39
37
t .Helper ()
40
- require .NoError (fixtures .Init ())
41
38
return buildSession (t , fixtures .ByTag ("worktree" ))
42
39
}
43
40
@@ -46,8 +43,6 @@ func buildSession(t *testing.T, repos fixtures.Fixtures,
46
43
require := require .New (t )
47
44
t .Helper ()
48
45
49
- require .NoError (fixtures .Init ())
50
-
51
46
pool := NewRepositoryPool (cache .DefaultMaxSize )
52
47
for _ , fixture := range repos {
53
48
path := fixture .Worktree ().Root ()
0 commit comments