Skip to content

Commit 043cea3

Browse files
mergify[bot]julienrbrttac0turtle
authored
feat(testutil/integration): allow to pass baseapp options (backport #21816) (#21818)
Co-authored-by: Julien Robert <julien@rbrt.fr> Co-authored-by: marbar3778 <marbar3778@yahoo.com>
1 parent 25255e4 commit 043cea3

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
5050

5151
* (x/bank) [#21460](https://github.com/cosmos/cosmos-sdk/pull/21460) Added `Sender` attribute in `MsgMultiSend` event.
5252
* (genutil) [#21701](https://github.com/cosmos/cosmos-sdk/pull/21701) Improved error messages for genesis validation.
53+
* (testutil/integration) [#21816](https://github.com/cosmos/cosmos-sdk/pull/21816) Allow to pass baseapp options in `NewIntegrationApp`.
5354

5455
### Bug Fixes
5556

testutil/integration/router.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ func NewIntegrationApp(
4747
keys map[string]*storetypes.KVStoreKey,
4848
appCodec codec.Codec,
4949
modules map[string]appmodule.AppModule,
50+
baseAppOptions ...func(*baseapp.BaseApp),
5051
) *App {
5152
db := dbm.NewMemDB()
5253

@@ -56,7 +57,7 @@ func NewIntegrationApp(
5657
basicModuleManager.RegisterInterfaces(interfaceRegistry)
5758

5859
txConfig := authtx.NewTxConfig(codec.NewProtoCodec(interfaceRegistry), authtx.DefaultSignModes)
59-
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseapp.SetChainID(appName))
60+
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), append(baseAppOptions, baseapp.SetChainID(appName))...)
6061
bApp.MountKVStores(keys)
6162

6263
bApp.SetInitChainer(func(_ sdk.Context, _ *cmtabcitypes.RequestInitChain) (*cmtabcitypes.ResponseInitChain, error) {

0 commit comments

Comments
 (0)