From 451e6973312693c019c76c5b0814a34a94d72f7f Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Mon, 11 Jul 2022 06:18:36 -0700 Subject: [PATCH] Update generated mocks after upgrade of Mockery v2. (#8973) --- abci/client/mocks/client.go | 4 ++-- internal/consensus/mocks/cons_sync_reactor.go | 4 ++-- internal/evidence/mocks/block_store.go | 4 ++-- internal/p2p/mocks/connection.go | 4 ++-- internal/p2p/mocks/peer.go | 4 ++-- internal/p2p/mocks/transport.go | 4 ++-- internal/proxy/mocks/app_conn_consensus.go | 4 ++-- internal/proxy/mocks/app_conn_mempool.go | 4 ++-- internal/proxy/mocks/app_conn_query.go | 4 ++-- internal/proxy/mocks/app_conn_snapshot.go | 4 ++-- internal/state/indexer/mocks/event_sink.go | 4 ++-- internal/state/mocks/block_store.go | 4 ++-- internal/state/mocks/evidence_pool.go | 4 ++-- internal/state/mocks/store.go | 4 ++-- internal/statesync/mocks/state_provider.go | 4 ++-- light/provider/mocks/provider.go | 4 ++-- light/rpc/mocks/light_client.go | 4 ++-- rpc/client/mocks/client.go | 4 ++-- 18 files changed, 36 insertions(+), 36 deletions(-) diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index cfe5ea7af..efd0960d6 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -802,13 +802,13 @@ func (_m *Client) Wait() { _m.Called() } -type NewClientT interface { +type mockConstructorTestingTNewClient interface { mock.TestingT Cleanup(func()) } // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClient(t NewClientT) *Client { +func NewClient(t mockConstructorTestingTNewClient) *Client { mock := &Client{} mock.Mock.Test(t) diff --git a/internal/consensus/mocks/cons_sync_reactor.go b/internal/consensus/mocks/cons_sync_reactor.go index 2c694742b..25caddfb9 100644 --- a/internal/consensus/mocks/cons_sync_reactor.go +++ b/internal/consensus/mocks/cons_sync_reactor.go @@ -27,13 +27,13 @@ func (_m *ConsSyncReactor) SwitchToConsensus(_a0 state.State, _a1 bool) { _m.Called(_a0, _a1) } -type NewConsSyncReactorT interface { +type mockConstructorTestingTNewConsSyncReactor interface { mock.TestingT Cleanup(func()) } // NewConsSyncReactor creates a new instance of ConsSyncReactor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConsSyncReactor(t NewConsSyncReactorT) *ConsSyncReactor { +func NewConsSyncReactor(t mockConstructorTestingTNewConsSyncReactor) *ConsSyncReactor { mock := &ConsSyncReactor{} mock.Mock.Test(t) diff --git a/internal/evidence/mocks/block_store.go b/internal/evidence/mocks/block_store.go index b0c67ff87..e61c4e0ae 100644 --- a/internal/evidence/mocks/block_store.go +++ b/internal/evidence/mocks/block_store.go @@ -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) diff --git a/internal/p2p/mocks/connection.go b/internal/p2p/mocks/connection.go index e5ba9584a..db86225b9 100644 --- a/internal/p2p/mocks/connection.go +++ b/internal/p2p/mocks/connection.go @@ -209,13 +209,13 @@ func (_m *Connection) TrySendMessage(_a0 p2p.ChannelID, _a1 []byte) (bool, error return r0, r1 } -type NewConnectionT interface { +type mockConstructorTestingTNewConnection interface { mock.TestingT Cleanup(func()) } // NewConnection creates a new instance of Connection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConnection(t NewConnectionT) *Connection { +func NewConnection(t mockConstructorTestingTNewConnection) *Connection { mock := &Connection{} mock.Mock.Test(t) diff --git a/internal/p2p/mocks/peer.go b/internal/p2p/mocks/peer.go index 021c905f2..67721be47 100644 --- a/internal/p2p/mocks/peer.go +++ b/internal/p2p/mocks/peer.go @@ -333,13 +333,13 @@ func (_m *Peer) Wait() { _m.Called() } -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) diff --git a/internal/p2p/mocks/transport.go b/internal/p2p/mocks/transport.go index 46d825501..2cf93e078 100644 --- a/internal/p2p/mocks/transport.go +++ b/internal/p2p/mocks/transport.go @@ -120,13 +120,13 @@ func (_m *Transport) String() string { return r0 } -type NewTransportT interface { +type mockConstructorTestingTNewTransport interface { mock.TestingT Cleanup(func()) } // NewTransport creates a new instance of Transport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTransport(t NewTransportT) *Transport { +func NewTransport(t mockConstructorTestingTNewTransport) *Transport { mock := &Transport{} mock.Mock.Test(t) diff --git a/internal/proxy/mocks/app_conn_consensus.go b/internal/proxy/mocks/app_conn_consensus.go index bff6bf6a4..b9f37301c 100644 --- a/internal/proxy/mocks/app_conn_consensus.go +++ b/internal/proxy/mocks/app_conn_consensus.go @@ -151,13 +151,13 @@ func (_m *AppConnConsensus) SetResponseCallback(_a0 abciclient.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) diff --git a/internal/proxy/mocks/app_conn_mempool.go b/internal/proxy/mocks/app_conn_mempool.go index a17deb7ca..6d62194fc 100644 --- a/internal/proxy/mocks/app_conn_mempool.go +++ b/internal/proxy/mocks/app_conn_mempool.go @@ -119,13 +119,13 @@ func (_m *AppConnMempool) SetResponseCallback(_a0 abciclient.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) diff --git a/internal/proxy/mocks/app_conn_query.go b/internal/proxy/mocks/app_conn_query.go index 9bde883a0..b73be9c0b 100644 --- a/internal/proxy/mocks/app_conn_query.go +++ b/internal/proxy/mocks/app_conn_query.go @@ -98,13 +98,13 @@ func (_m *AppConnQuery) QuerySync(_a0 context.Context, _a1 types.RequestQuery) ( 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) diff --git a/internal/proxy/mocks/app_conn_snapshot.go b/internal/proxy/mocks/app_conn_snapshot.go index 36df29781..d7469c44d 100644 --- a/internal/proxy/mocks/app_conn_snapshot.go +++ b/internal/proxy/mocks/app_conn_snapshot.go @@ -121,13 +121,13 @@ func (_m *AppConnSnapshot) OfferSnapshotSync(_a0 context.Context, _a1 types.Requ 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) diff --git a/internal/state/indexer/mocks/event_sink.go b/internal/state/indexer/mocks/event_sink.go index ec5e279a8..984d8414d 100644 --- a/internal/state/indexer/mocks/event_sink.go +++ b/internal/state/indexer/mocks/event_sink.go @@ -166,13 +166,13 @@ func (_m *EventSink) Type() indexer.EventSinkType { return r0 } -type NewEventSinkT interface { +type mockConstructorTestingTNewEventSink interface { mock.TestingT Cleanup(func()) } // NewEventSink creates a new instance of EventSink. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEventSink(t NewEventSinkT) *EventSink { +func NewEventSink(t mockConstructorTestingTNewEventSink) *EventSink { mock := &EventSink{} mock.Mock.Test(t) diff --git a/internal/state/mocks/block_store.go b/internal/state/mocks/block_store.go index b4d0c7f99..23532da75 100644 --- a/internal/state/mocks/block_store.go +++ b/internal/state/mocks/block_store.go @@ -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) diff --git a/internal/state/mocks/evidence_pool.go b/internal/state/mocks/evidence_pool.go index 8bc208289..9a21c73ce 100644 --- a/internal/state/mocks/evidence_pool.go +++ b/internal/state/mocks/evidence_pool.go @@ -69,13 +69,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) diff --git a/internal/state/mocks/store.go b/internal/state/mocks/store.go index d08ba4c9e..91dad3127 100644 --- a/internal/state/mocks/store.go +++ b/internal/state/mocks/store.go @@ -187,13 +187,13 @@ func (_m *Store) SaveValidatorSets(_a0 int64, _a1 int64, _a2 *types.ValidatorSet 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) diff --git a/internal/statesync/mocks/state_provider.go b/internal/statesync/mocks/state_provider.go index 17ddb54ac..099588ed1 100644 --- a/internal/statesync/mocks/state_provider.go +++ b/internal/statesync/mocks/state_provider.go @@ -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) diff --git a/light/provider/mocks/provider.go b/light/provider/mocks/provider.go index 9a5789ce9..a17bc4cb5 100644 --- a/light/provider/mocks/provider.go +++ b/light/provider/mocks/provider.go @@ -52,13 +52,13 @@ func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) erro return r0 } -type NewProviderT interface { +type mockConstructorTestingTNewProvider interface { mock.TestingT Cleanup(func()) } // NewProvider creates a new instance of Provider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProvider(t NewProviderT) *Provider { +func NewProvider(t mockConstructorTestingTNewProvider) *Provider { mock := &Provider{} mock.Mock.Test(t) diff --git a/light/rpc/mocks/light_client.go b/light/rpc/mocks/light_client.go index 25e101c86..fabf73b01 100644 --- a/light/rpc/mocks/light_client.go +++ b/light/rpc/mocks/light_client.go @@ -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) diff --git a/rpc/client/mocks/client.go b/rpc/client/mocks/client.go index 0f1581f70..2b5ff2670 100644 --- a/rpc/client/mocks/client.go +++ b/rpc/client/mocks/client.go @@ -801,13 +801,13 @@ func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perP return r0, r1 } -type NewClientT interface { +type mockConstructorTestingTNewClient interface { mock.TestingT Cleanup(func()) } // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClient(t NewClientT) *Client { +func NewClient(t mockConstructorTestingTNewClient) *Client { mock := &Client{} mock.Mock.Test(t)