From cf1d5213b2cb1cacb958a80a9782ff4ebb7c15aa Mon Sep 17 00:00:00 2001 From: hacheigriega Date: Wed, 14 Feb 2024 09:20:34 -0500 Subject: [PATCH] refactor: relocate integration testing utils --- {app => integration}/integration.go | 2 +- x/vesting/keeper/integration_test.go | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) rename {app => integration}/integration.go (99%) diff --git a/app/integration.go b/integration/integration.go similarity index 99% rename from app/integration.go rename to integration/integration.go index 5c5c3222..d81aeb92 100644 --- a/app/integration.go +++ b/integration/integration.go @@ -1,4 +1,4 @@ -package app +package integration import ( "fmt" diff --git a/x/vesting/keeper/integration_test.go b/x/vesting/keeper/integration_test.go index d0c4a07b..dc79916d 100644 --- a/x/vesting/keeper/integration_test.go +++ b/x/vesting/keeper/integration_test.go @@ -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" @@ -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" @@ -63,7 +64,7 @@ var ( ) type fixture struct { - *app.IntegationApp + *integration.IntegationApp cdc codec.Codec accountKeeper authkeeper.AccountKeeper bankKeeper bankkeeper.Keeper @@ -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) @@ -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,