abci: application type should take contexts (#8388)

This commit is contained in:
Sam Kleinman
2022-04-22 10:58:01 -04:00
committed by GitHub
parent 6970c9177b
commit 8345dc4f7c
38 changed files with 543 additions and 357 deletions

View File

@@ -7,6 +7,8 @@ import (
mock "github.com/stretchr/testify/mock"
testing "testing"
types "github.com/tendermint/tendermint/types"
)
@@ -65,3 +67,12 @@ func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) erro
return r0
}
// NewProvider creates a new instance of Provider. It also registers a cleanup function to assert the mocks expectations.
func NewProvider(t testing.TB) *Provider {
mock := &Provider{}
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

View File

@@ -7,6 +7,8 @@ import (
mock "github.com/stretchr/testify/mock"
testing "testing"
time "time"
types "github.com/tendermint/tendermint/types"
@@ -115,3 +117,12 @@ func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int6
return r0, r1
}
// NewLightClient creates a new instance of LightClient. It also registers a cleanup function to assert the mocks expectations.
func NewLightClient(t testing.TB) *LightClient {
mock := &LightClient{}
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}