mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +00:00
The `mockery` project recommends against using a binary of `mockery` that has been created using `go install`. https://github.com/vektra/mockery/pull/456. Developers of Tendermint wishing to generate mocks should avoid having a version of `mockery` on their path that does not match the version listed in [mockery_generate.sh](10e1ac8fea/scripts/mockery_generate.sh (L11)). To make this easier for developers, the `mockery_generate.sh` script uses a containerized copy of `mockery` if `mockery` is not present on the developer's `PATH`. This containerized version of `mockery` uses the same version of mockery as our CI pipelines and allows all developers to automatically use the same version without having to manage it themselves.
#### PR checklist
- [ ] Tests written/updated, or no tests needed
- [ ] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [ ] Updated relevant documentation (`docs/`) and code comments, or no
documentation updates needed
75 lines
1.6 KiB
Go
75 lines
1.6 KiB
Go
// Code generated by mockery. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
mock "github.com/stretchr/testify/mock"
|
|
types "github.com/tendermint/tendermint/types"
|
|
)
|
|
|
|
// BlockStore is an autogenerated mock type for the BlockStore type
|
|
type BlockStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Height provides a mock function with given fields:
|
|
func (_m *BlockStore) Height() int64 {
|
|
ret := _m.Called()
|
|
|
|
var r0 int64
|
|
if rf, ok := ret.Get(0).(func() int64); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// LoadBlockCommit provides a mock function with given fields: height
|
|
func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit {
|
|
ret := _m.Called(height)
|
|
|
|
var r0 *types.Commit
|
|
if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok {
|
|
r0 = rf(height)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*types.Commit)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// LoadBlockMeta provides a mock function with given fields: height
|
|
func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta {
|
|
ret := _m.Called(height)
|
|
|
|
var r0 *types.BlockMeta
|
|
if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok {
|
|
r0 = rf(height)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*types.BlockMeta)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
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 mockConstructorTestingTNewBlockStore) *BlockStore {
|
|
mock := &BlockStore{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|