Skip to content

Commit

Permalink
refactor: relocate integration testing utils
Browse files Browse the repository at this point in the history
  • Loading branch information
hacheigriega committed Feb 14, 2024
1 parent dcb9413 commit cf1d521
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/integration.go → integration/integration.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package app
package integration

import (
"fmt"
Expand Down
9 changes: 5 additions & 4 deletions x/vesting/keeper/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/runtime"
"github.com/cosmos/cosmos-sdk/testutil/integration"
sdkintegration "github.com/cosmos/cosmos-sdk/testutil/integration"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
Expand All @@ -33,6 +33,7 @@ import (

"github.com/sedaprotocol/seda-chain/app"
"github.com/sedaprotocol/seda-chain/app/params"
"github.com/sedaprotocol/seda-chain/integration"
"github.com/sedaprotocol/seda-chain/x/staking"
stakingkeeper "github.com/sedaprotocol/seda-chain/x/staking/keeper"
"github.com/sedaprotocol/seda-chain/x/vesting"
Expand Down Expand Up @@ -63,7 +64,7 @@ var (
)

type fixture struct {
*app.IntegationApp
*integration.IntegationApp
cdc codec.Codec
accountKeeper authkeeper.AccountKeeper
bankKeeper bankkeeper.Keeper
Expand All @@ -78,7 +79,7 @@ func initFixture(tb testing.TB) *fixture {
cdc := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}, bank.AppModuleBasic{}, vesting.AppModuleBasic{}).Codec

logger := log.NewTestLogger(tb)
cms := integration.CreateMultiStore(keys, logger)
cms := sdkintegration.CreateMultiStore(keys, logger)

newCtx := sdk.NewContext(cms, cmtproto.Header{Time: time.Now().UTC()}, true, logger)

Expand Down Expand Up @@ -126,7 +127,7 @@ func initFixture(tb testing.TB) *fixture {
stakingModule := staking.NewAppModule(cdc, stakingKeeper, accountKeeper, bankKeeper, nil)
vestingModule := vesting.NewAppModule(accountKeeper, bankKeeper, stakingKeeper)

integrationApp := app.NewIntegrationApp(newCtx, logger, keys, cdc, map[string]appmodule.AppModule{
integrationApp := integration.NewIntegrationApp(newCtx, logger, keys, cdc, map[string]appmodule.AppModule{
authtypes.ModuleName: authModule,
banktypes.ModuleName: bankModule,
sdkstakingtypes.ModuleName: stakingModule,
Expand Down

0 comments on commit cf1d521

Please sign in to comment.