github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/executiondatasync/tracker/mock/util.go (about) 1 package mocktracker 2 3 import ( 4 "github.com/ipfs/go-cid" 5 mock "github.com/stretchr/testify/mock" 6 7 tracker "github.com/onflow/flow-go/module/executiondatasync/tracker" 8 ) 9 10 func NewMockStorage() *Storage { 11 trackerStorage := new(Storage) 12 trackerStorage.On("Update", mock.Anything).Return(func(fn tracker.UpdateFn) error { 13 return fn(func(uint64, ...cid.Cid) error { return nil }) 14 }) 15 16 trackerStorage.On("SetFulfilledHeight", mock.Anything).Return(nil) 17 18 return trackerStorage 19 }