update rpc mocks

This commit is contained in:
Sam Ricotta
2022-08-08 14:19:58 +02:00
parent 3b4196b2da
commit 2adeb74cb5
14 changed files with 44 additions and 44 deletions

View File

@@ -58,13 +58,13 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta {
return r0
}
type NewBlockStoreT interface {
type mockConstructorTestingTNewBlockStore interface {
mock.TestingT
Cleanup(func())
}
// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewBlockStore(t NewBlockStoreT) *BlockStore {
func NewBlockStore(t mockConstructorTestingTNewBlockStore) *BlockStore {
mock := &BlockStore{}
mock.Mock.Test(t)

View File

@@ -100,13 +100,13 @@ func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int6
return r0, r1
}
type NewLightClientT interface {
type mockConstructorTestingTNewLightClient interface {
mock.TestingT
Cleanup(func())
}
// NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewLightClient(t NewLightClientT) *LightClient {
func NewLightClient(t mockConstructorTestingTNewLightClient) *LightClient {
mock := &LightClient{}
mock.Mock.Test(t)

View File

@@ -330,13 +330,13 @@ func (_m *Peer) TrySend(_a0 byte, _a1 []byte) bool {
return r0
}
type NewPeerT interface {
type mockConstructorTestingTNewPeer interface {
mock.TestingT
Cleanup(func())
}
// NewPeer creates a new instance of Peer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewPeer(t NewPeerT) *Peer {
func NewPeer(t mockConstructorTestingTNewPeer) *Peer {
mock := &Peer{}
mock.Mock.Test(t)

View File

@@ -141,13 +141,13 @@ func (_m *AppConnConsensus) SetResponseCallback(_a0 abcicli.Callback) {
_m.Called(_a0)
}
type NewAppConnConsensusT interface {
type mockConstructorTestingTNewAppConnConsensus interface {
mock.TestingT
Cleanup(func())
}
// NewAppConnConsensus creates a new instance of AppConnConsensus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAppConnConsensus(t NewAppConnConsensusT) *AppConnConsensus {
func NewAppConnConsensus(t mockConstructorTestingTNewAppConnConsensus) *AppConnConsensus {
mock := &AppConnConsensus{}
mock.Mock.Test(t)

View File

@@ -102,13 +102,13 @@ func (_m *AppConnMempool) SetResponseCallback(_a0 abcicli.Callback) {
_m.Called(_a0)
}
type NewAppConnMempoolT interface {
type mockConstructorTestingTNewAppConnMempool interface {
mock.TestingT
Cleanup(func())
}
// NewAppConnMempool creates a new instance of AppConnMempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAppConnMempool(t NewAppConnMempoolT) *AppConnMempool {
func NewAppConnMempool(t mockConstructorTestingTNewAppConnMempool) *AppConnMempool {
mock := &AppConnMempool{}
mock.Mock.Test(t)

View File

@@ -96,13 +96,13 @@ func (_m *AppConnQuery) QuerySync(_a0 types.RequestQuery) (*types.ResponseQuery,
return r0, r1
}
type NewAppConnQueryT interface {
type mockConstructorTestingTNewAppConnQuery interface {
mock.TestingT
Cleanup(func())
}
// NewAppConnQuery creates a new instance of AppConnQuery. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAppConnQuery(t NewAppConnQueryT) *AppConnQuery {
func NewAppConnQuery(t mockConstructorTestingTNewAppConnQuery) *AppConnQuery {
mock := &AppConnQuery{}
mock.Mock.Test(t)

View File

@@ -119,13 +119,13 @@ func (_m *AppConnSnapshot) OfferSnapshotSync(_a0 types.RequestOfferSnapshot) (*t
return r0, r1
}
type NewAppConnSnapshotT interface {
type mockConstructorTestingTNewAppConnSnapshot interface {
mock.TestingT
Cleanup(func())
}
// NewAppConnSnapshot creates a new instance of AppConnSnapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAppConnSnapshot(t NewAppConnSnapshotT) *AppConnSnapshot {
func NewAppConnSnapshot(t mockConstructorTestingTNewAppConnSnapshot) *AppConnSnapshot {
mock := &AppConnSnapshot{}
mock.Mock.Test(t)

View File

@@ -35,13 +35,13 @@ func (_m *ClientCreator) NewABCIClient() (abcicli.Client, error) {
return r0, r1
}
type NewClientCreatorT interface {
type mockConstructorTestingTNewClientCreator interface {
mock.TestingT
Cleanup(func())
}
// NewClientCreator creates a new instance of ClientCreator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewClientCreator(t NewClientCreatorT) *ClientCreator {
func NewClientCreator(t mockConstructorTestingTNewClientCreator) *ClientCreator {
mock := &ClientCreator{}
mock.Mock.Test(t)

View File

@@ -75,13 +75,13 @@ func (_m *BlockIndexer) Search(ctx context.Context, q *query.Query) ([]int64, er
return r0, r1
}
type NewBlockIndexerT interface {
type mockConstructorTestingTNewBlockIndexer interface {
mock.TestingT
Cleanup(func())
}
// NewBlockIndexer creates a new instance of BlockIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewBlockIndexer(t NewBlockIndexerT) *BlockIndexer {
func NewBlockIndexer(t mockConstructorTestingTNewBlockIndexer) *BlockIndexer {
mock := &BlockIndexer{}
mock.Mock.Test(t)

View File

@@ -121,22 +121,6 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta {
return r0
}
// LoadBlockPart provides a mock function with given fields: height, index
func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part {
ret := _m.Called(height, index)
var r0 *types.Part
if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok {
r0 = rf(height, index)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.Part)
}
}
return r0
}
// LoadBlockMetaByHash provides a mock function with given fields: hash
func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta {
ret := _m.Called(hash)
@@ -153,6 +137,22 @@ func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta {
return r0
}
// LoadBlockPart provides a mock function with given fields: height, index
func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part {
ret := _m.Called(height, index)
var r0 *types.Part
if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok {
r0 = rf(height, index)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.Part)
}
}
return r0
}
// LoadSeenCommit provides a mock function with given fields: height
func (_m *BlockStore) LoadSeenCommit(height int64) *types.Commit {
ret := _m.Called(height)
@@ -209,13 +209,13 @@ func (_m *BlockStore) Size() int64 {
return r0
}
type NewBlockStoreT interface {
type mockConstructorTestingTNewBlockStore interface {
mock.TestingT
Cleanup(func())
}
// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewBlockStore(t NewBlockStoreT) *BlockStore {
func NewBlockStore(t mockConstructorTestingTNewBlockStore) *BlockStore {
mock := &BlockStore{}
mock.Mock.Test(t)

View File

@@ -70,13 +70,13 @@ func (_m *EvidencePool) Update(_a0 state.State, _a1 types.EvidenceList) {
_m.Called(_a0, _a1)
}
type NewEvidencePoolT interface {
type mockConstructorTestingTNewEvidencePool interface {
mock.TestingT
Cleanup(func())
}
// NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewEvidencePool(t NewEvidencePoolT) *EvidencePool {
func NewEvidencePool(t mockConstructorTestingTNewEvidencePool) *EvidencePool {
mock := &EvidencePool{}
mock.Mock.Test(t)

View File

@@ -218,13 +218,13 @@ func (_m *Store) SaveABCIResponses(_a0 int64, _a1 *tendermintstate.ABCIResponses
return r0
}
type NewStoreT interface {
type mockConstructorTestingTNewStore interface {
mock.TestingT
Cleanup(func())
}
// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewStore(t NewStoreT) *Store {
func NewStore(t mockConstructorTestingTNewStore) *Store {
mock := &Store{}
mock.Mock.Test(t)

View File

@@ -92,13 +92,13 @@ func (_m *TxIndexer) Search(ctx context.Context, q *query.Query) ([]*types.TxRes
return r0, r1
}
type NewTxIndexerT interface {
type mockConstructorTestingTNewTxIndexer interface {
mock.TestingT
Cleanup(func())
}
// NewTxIndexer creates a new instance of TxIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewTxIndexer(t NewTxIndexerT) *TxIndexer {
func NewTxIndexer(t mockConstructorTestingTNewTxIndexer) *TxIndexer {
mock := &TxIndexer{}
mock.Mock.Test(t)

View File

@@ -83,13 +83,13 @@ func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State,
return r0, r1
}
type NewStateProviderT interface {
type mockConstructorTestingTNewStateProvider interface {
mock.TestingT
Cleanup(func())
}
// NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewStateProvider(t NewStateProviderT) *StateProvider {
func NewStateProvider(t mockConstructorTestingTNewStateProvider) *StateProvider {
mock := &StateProvider{}
mock.Mock.Test(t)