makefile: buf setup backport v0.34 (#8863)

This commit is contained in:
Jasmina Malicevic
2022-06-24 13:58:25 -04:00
committed by GitHub
parent 4a1df4911d
commit b83cc0aeda
19 changed files with 318 additions and 94 deletions
+15 -1
View File
@@ -4,7 +4,6 @@ package mocks
import (
mock "github.com/stretchr/testify/mock"
types "github.com/tendermint/tendermint/types"
)
@@ -58,3 +57,18 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta {
return r0
}
type NewBlockStoreT 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 {
mock := &BlockStore{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}