github.com/koko1123/flow-go-1@v0.29.6/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/koko1123/flow-go-1/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  }