Skip to content

Commit

Permalink
feat(testutil/integration): allow to pass baseapp options (#21816)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Sep 19, 2024
1 parent c9b90ad commit bdda21f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
### Improvements

* (genutil) [#21701](https://github.com/cosmos/cosmos-sdk/pull/21701) Improved error messages for genesis validation.
* (sims)[#21613](https://github.com/cosmos/cosmos-sdk/pull/21613) Add sims2 framework and factory methods for simpler message factories in modules
* (sims) [#21613](https://github.com/cosmos/cosmos-sdk/pull/21613) Add sims2 framework and factory methods for simpler message factories in modules
* (testutil/integration) [#21816](https://github.com/cosmos/cosmos-sdk/pull/21816) Allow to pass baseapp options in `NewIntegrationApp`.

### Bug Fixes

Expand Down
3 changes: 2 additions & 1 deletion testutil/integration/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func NewIntegrationApp(
modules map[string]appmodule.AppModule,
msgRouter *baseapp.MsgServiceRouter,
grpcRouter *baseapp.GRPCQueryRouter,
baseAppOptions ...func(*baseapp.BaseApp),
) *App {
db := coretesting.NewMemDB()

Expand All @@ -63,7 +64,7 @@ func NewIntegrationApp(
moduleManager.RegisterInterfaces(interfaceRegistry)

txConfig := authtx.NewTxConfig(codec.NewProtoCodec(interfaceRegistry), addressCodec, validatorCodec, authtx.DefaultSignModes)
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseapp.SetChainID(appName))
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), append(baseAppOptions, baseapp.SetChainID(appName))...)
bApp.MountKVStores(keys)

bApp.SetInitChainer(func(_ sdk.Context, _ *cmtabcitypes.InitChainRequest) (*cmtabcitypes.InitChainResponse, error) {
Expand Down

0 comments on commit bdda21f

Please sign in to comment.