Skip to content

Commit 2414342

Browse files
committed
fix indexer tests
1 parent a1baef2 commit 2414342

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

module/state_synchronization/indexer/indexer_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"testing"
77
"time"
88

9-
mocks "github.com/stretchr/testify/mock"
109
"github.com/stretchr/testify/require"
1110
"go.uber.org/atomic"
1211

@@ -202,7 +201,7 @@ func TestIndexer_Success(t *testing.T) {
202201
})
203202

204203
test.executionData.On("Get", blockID).Return(ed, true).Once()
205-
test.indexTest.collections.On("StoreAndIndexByTransaction", mocks.Anything, collection).Return(collection.Light(), nil).Once()
204+
test.indexTest.collectionIndexer.On("OnCollectionReceived", collection).Return(nil).Once()
206205
test.indexTest.registers.On("Store", flow.RegisterEntries{}, block.Height).Return(nil).Once()
207206
}
208207

@@ -244,7 +243,7 @@ func TestIndexer_Failure(t *testing.T) {
244243
})
245244

246245
test.executionData.On("Get", blockID).Return(ed, true).Once()
247-
test.indexTest.collections.On("StoreAndIndexByTransaction", mocks.Anything, collection).Return(collection.Light(), nil).Once()
246+
test.indexTest.collectionIndexer.On("OnCollectionReceived", collection).Return(nil).Once()
248247

249248
// return an error on the last block to trigger the error path
250249
if block.Height == lastHeight {

0 commit comments

Comments
 (0)