Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
borovskyav committed Sep 5, 2019
1 parent 453c2f6 commit 74079c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,10 @@ func TestIndex_CreateAndFill(t *testing.T) {

Convey("Test check error handling in the handleTriggerBatches", t, func() {
index := NewSearchIndex(logger, dataBase)
expectedError := fmt.Errorf("test")

dataBase.EXPECT().GetTriggerChecks(triggerIDs[:20]).Return(triggerChecksPointers[:20], nil)
dataBase.EXPECT().GetTriggerChecks(triggerIDs[20:]).Return(triggerChecksPointers[20:], fmt.Errorf("test"))
dataBase.EXPECT().GetTriggerChecks(triggerIDs[20:]).Return(triggerChecksPointers[20:], fmt.Errorf("test"))
dataBase.EXPECT().GetTriggerChecks(triggerIDs[20:]).Return(triggerChecksPointers[20:], fmt.Errorf("test"))
dataBase.EXPECT().GetTriggerChecks(triggerIDs[20:]).Return(triggerChecksPointers[20:], fmt.Errorf("test"))
dataBase.EXPECT().GetTriggerChecks(triggerIDs[20:]).Return(triggerChecksPointers[20:], expectedError).Times(3)
err := index.writeByBatches(triggerIDs, 20)
So(err, ShouldNotBeNil)
})
Expand Down

0 comments on commit 74079c7

Please sign in to comment.