File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ func TestCommon(t *testing.T) {
23
23
}
24
24
25
25
type BaseQueueSuite struct {
26
- suite .Suite
26
+ test .Suite
27
27
broker queue.Broker
28
28
queue queue.Queue
29
29
queueName string
@@ -36,10 +36,12 @@ func (s *BaseQueueSuite) SetupSuite() {
36
36
37
37
func (s * BaseQueueSuite ) SetupTest () {
38
38
s .connectQueue ()
39
+ s .Suite .Setup ()
39
40
}
40
41
41
42
func (s * BaseQueueSuite ) TearDownTest () {
42
43
s .NoError (s .broker .Close ())
44
+ s .Suite .TearDown ()
43
45
}
44
46
45
47
func (s * BaseQueueSuite ) connectQueue () {
Original file line number Diff line number Diff line change 9
9
"github.com/satori/go.uuid"
10
10
"github.com/stretchr/testify/require"
11
11
"github.com/stretchr/testify/suite"
12
- "gopkg.in/src-d/core-retrieval.v0"
13
- rmodel "gopkg.in/src-d/core-retrieval.v0/model"
12
+ "gopkg.in/src-d/core-retrieval.v0/model"
14
13
"gopkg.in/src-d/framework.v0/queue"
15
14
)
16
15
@@ -36,18 +35,14 @@ func (s *ProducerSuite) SetupSuite() {
36
35
}
37
36
38
37
func (s * ProducerSuite ) newProducer () * Producer {
39
- DropTables ("repository" )
40
- DropIndexes ("idx_endpoints" )
41
- CreateRepositoryTable ()
42
- storer := core .ModelRepositoryStore ()
43
-
38
+ storer := model .NewRepositoryStore (s .DB )
44
39
return NewProducer (NewMentionJobIter (s .mentionsQueue , storer ), s .queue )
45
40
}
46
41
47
42
func (s * ProducerSuite ) newJob () * queue.Job {
48
43
j := queue .NewJob ()
49
- m := & rmodel .Mention {
50
- VCS : rmodel .GIT ,
44
+ m := & model .Mention {
45
+ VCS : model .GIT ,
51
46
Provider : "TEST_PROVIDER" ,
52
47
Endpoint : testEndpoint ,
53
48
}
You can’t perform that action at this time.
0 commit comments