test(x/distribution): write integration tests (#15569)
Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
co-authored by
Marko
parent
56705deb22
commit
495ef01f71
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"cosmossdk.io/log"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
@@ -33,7 +34,7 @@ func Example() {
|
||||
authority := authtypes.NewModuleAddress("gov").String()
|
||||
|
||||
// replace the logger by testing values in a real test case (e.g. log.NewTestLogger(t))
|
||||
logger := log.NewLogger(io.Discard, log.OutputJSONOption())
|
||||
logger := log.NewNopLogger()
|
||||
|
||||
cms := integration.CreateMultiStore(keys, logger)
|
||||
newCtx := sdk.NewContext(cms, cmtproto.Header{}, true, logger)
|
||||
|
||||
@@ -56,11 +56,11 @@ func NewIntegrationApp(sdkCtx sdk.Context, logger log.Logger, keys map[string]*s
|
||||
})
|
||||
|
||||
moduleManager := module.NewManager(modules...)
|
||||
bApp.SetBeginBlocker(func(ctx sdk.Context, req cmtabcitypes.RequestBeginBlock) (cmtabcitypes.ResponseBeginBlock, error) {
|
||||
return moduleManager.BeginBlock(ctx, req)
|
||||
bApp.SetBeginBlocker(func(_ sdk.Context, req cmtabcitypes.RequestBeginBlock) (cmtabcitypes.ResponseBeginBlock, error) {
|
||||
return moduleManager.BeginBlock(sdkCtx, req)
|
||||
})
|
||||
bApp.SetEndBlocker(func(ctx sdk.Context, req cmtabcitypes.RequestEndBlock) (cmtabcitypes.ResponseEndBlock, error) {
|
||||
return moduleManager.EndBlock(ctx, req)
|
||||
bApp.SetEndBlocker(func(_ sdk.Context, req cmtabcitypes.RequestEndBlock) (cmtabcitypes.ResponseEndBlock, error) {
|
||||
return moduleManager.EndBlock(sdkCtx, req)
|
||||
})
|
||||
|
||||
router := baseapp.NewMsgServiceRouter()
|
||||
|
||||
Reference in New Issue
Block a user