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
#	testutil/integration/router.go
  • Loading branch information
julienrbrt authored and mergify[bot] committed Sep 19, 2024
1 parent 25255e4 commit 4b78469
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (x/bank) [#21460](https://github.com/cosmos/cosmos-sdk/pull/21460) Added `Sender` attribute in `MsgMultiSend` event.
* (genutil) [#21701](https://github.com/cosmos/cosmos-sdk/pull/21701) Improved error messages for genesis validation.
<<<<<<< HEAD
=======
* (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))
### Bug Fixes

Expand Down
11 changes: 11 additions & 0 deletions testutil/integration/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ func NewIntegrationApp(
keys map[string]*storetypes.KVStoreKey,
appCodec codec.Codec,
modules map[string]appmodule.AppModule,
<<<<<<< HEAD

Check failure on line 50 in testutil/integration/router.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected ')', found '<<'

Check failure on line 50 in testutil/integration/router.go

View workflow job for this annotation

GitHub Actions / dependency-review

missing ',' before newline in parameter list
=======

Check failure on line 51 in testutil/integration/router.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected ')', found '=='
msgRouter *baseapp.MsgServiceRouter,
grpcRouter *baseapp.GRPCQueryRouter,
baseAppOptions ...func(*baseapp.BaseApp),
>>>>>>> bdda21f2f (feat(testutil/integration): allow to pass baseapp options (#21816))

Check failure on line 55 in testutil/integration/router.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected ')', found '>>'

Check failure on line 55 in testutil/integration/router.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected ';', found ':'

Check failure on line 55 in testutil/integration/router.go

View workflow job for this annotation

GitHub Actions / dependency-review

illegal character U+0023 '#'
) *App {
db := dbm.NewMemDB()

Expand All @@ -55,8 +61,13 @@ func NewIntegrationApp(
basicModuleManager := module.NewBasicManagerFromManager(moduleManager, nil)
basicModuleManager.RegisterInterfaces(interfaceRegistry)

<<<<<<< HEAD
txConfig := authtx.NewTxConfig(codec.NewProtoCodec(interfaceRegistry), authtx.DefaultSignModes)
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseapp.SetChainID(appName))
=======
txConfig := authtx.NewTxConfig(codec.NewProtoCodec(interfaceRegistry), addressCodec, validatorCodec, authtx.DefaultSignModes)
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), append(baseAppOptions, baseapp.SetChainID(appName))...)
>>>>>>> bdda21f2f (feat(testutil/integration): allow to pass baseapp options (#21816))

Check failure on line 70 in testutil/integration/router.go

View workflow job for this annotation

GitHub Actions / dependency-review

illegal character U+0023 '#'
bApp.MountKVStores(keys)

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

0 comments on commit 4b78469

Please sign in to comment.