From 690ed8dd2c1df04fd90c72e122f0d85df52411f5 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 19 Sep 2024 12:00:33 +0200 Subject: [PATCH 1/2] feat(testutil/integration): allow to pass baseapp options --- CHANGELOG.md | 3 ++- testutil/integration/router.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d7602c02fb0..6fb9a032f388 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) []() Allow to pass baseapp options in `NewIntegrationApp`. ### Bug Fixes diff --git a/testutil/integration/router.go b/testutil/integration/router.go index f2427f02fd6e..07bbe3d4c206 100644 --- a/testutil/integration/router.go +++ b/testutil/integration/router.go @@ -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() @@ -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) { From 54de2fa95e65888518ae4dc2322efa9969d6e976 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 19 Sep 2024 12:01:34 +0200 Subject: [PATCH 2/2] cl --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fb9a032f388..ffb15bee3b26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,7 +51,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (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 -* (testutil/integration) []() Allow to pass baseapp options in `NewIntegrationApp`. +* (testutil/integration) [#21816](https://github.com/cosmos/cosmos-sdk/pull/21816) Allow to pass baseapp options in `NewIntegrationApp`. ### Bug Fixes