fix mockery generation script (#9094) (#9114)

This commit is contained in:
Callum Waters
2022-07-30 16:31:04 +02:00
committed by GitHub
parent 46badfabd9
commit 0846f3e4c7
27 changed files with 81 additions and 50 deletions

View File

@@ -5,7 +5,7 @@ import (
"github.com/tendermint/tendermint/abci/types"
)
//go:generate mockery --case underscore --name AppConnConsensus|AppConnMempool|AppConnQuery|AppConnSnapshot
//go:generate ../scripts/mockery_generate.sh AppConnConsensus|AppConnMempool|AppConnQuery|AppConnSnapshot
//----------------------------------------------------------------------------------------
// Enforce which abci msgs can be sent on a connection at the type level

View File

@@ -11,6 +11,8 @@ import (
e2e "github.com/tendermint/tendermint/test/e2e/app"
)
//go:generate ../scripts/mockery_generate.sh ClientCreator
// ClientCreator creates new ABCI clients.
type ClientCreator interface {
// NewABCIClient returns a new ABCI client.

View File

@@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT.
// Code generated by mockery. DO NOT EDIT.
package mocks
@@ -141,13 +141,13 @@ func (_m *AppConnConsensus) SetResponseCallback(_a0 abcicli.Callback) {
_m.Called(_a0)
}
type mockConstructorTestingTNewAppConnConsensus interface {
type NewAppConnConsensusT 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 mockConstructorTestingTNewAppConnConsensus) *AppConnConsensus {
func NewAppConnConsensus(t NewAppConnConsensusT) *AppConnConsensus {
mock := &AppConnConsensus{}
mock.Mock.Test(t)

View File

@@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT.
// Code generated by mockery. DO NOT EDIT.
package mocks
@@ -102,13 +102,13 @@ func (_m *AppConnMempool) SetResponseCallback(_a0 abcicli.Callback) {
_m.Called(_a0)
}
type mockConstructorTestingTNewAppConnMempool interface {
type NewAppConnMempoolT 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 mockConstructorTestingTNewAppConnMempool) *AppConnMempool {
func NewAppConnMempool(t NewAppConnMempoolT) *AppConnMempool {
mock := &AppConnMempool{}
mock.Mock.Test(t)

View File

@@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT.
// Code generated by mockery. DO NOT EDIT.
package mocks
@@ -96,13 +96,13 @@ func (_m *AppConnQuery) QuerySync(_a0 types.RequestQuery) (*types.ResponseQuery,
return r0, r1
}
type mockConstructorTestingTNewAppConnQuery interface {
type NewAppConnQueryT 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 mockConstructorTestingTNewAppConnQuery) *AppConnQuery {
func NewAppConnQuery(t NewAppConnQueryT) *AppConnQuery {
mock := &AppConnQuery{}
mock.Mock.Test(t)

View File

@@ -1,4 +1,4 @@
// Code generated by mockery v2.14.0. DO NOT EDIT.
// Code generated by mockery. DO NOT EDIT.
package mocks
@@ -119,13 +119,13 @@ func (_m *AppConnSnapshot) OfferSnapshotSync(_a0 types.RequestOfferSnapshot) (*t
return r0, r1
}
type mockConstructorTestingTNewAppConnSnapshot interface {
type NewAppConnSnapshotT 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 mockConstructorTestingTNewAppConnSnapshot) *AppConnSnapshot {
func NewAppConnSnapshot(t NewAppConnSnapshotT) *AppConnSnapshot {
mock := &AppConnSnapshot{}
mock.Mock.Test(t)

View File

@@ -1,10 +1,9 @@
// Code generated by mockery v1.1.1. DO NOT EDIT.
// Code generated by mockery. DO NOT EDIT.
package mocks
import (
mock "github.com/stretchr/testify/mock"
abcicli "github.com/tendermint/tendermint/abci/client"
)
@@ -35,3 +34,18 @@ func (_m *ClientCreator) NewABCIClient() (abcicli.Client, error) {
return r0, r1
}
type NewClientCreatorT 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 {
mock := &ClientCreator{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}