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
(cherry picked from commit bdda21f)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
julienrbrt authored and mergify[bot] committed Sep 19, 2024
1 parent ba74aa5 commit dae0782
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ 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.
<<<<<<< HEAD
* (runtime) [#21704](https://github.com/cosmos/cosmos-sdk/pull/21704) Move `upgradetypes.StoreLoader` to runtime and alias it in upgrade for backward compatibility.
* (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`.
>>>>>>> bdda21f2f (feat(testutil/integration): allow to pass baseapp options (#21816))
### API Breaking Changes

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 dae0782

Please sign in to comment.