diff --git a/client/context_test.go b/client/context_test.go index 82feeebe4dfe..fedef9cc2d23 100644 --- a/client/context_test.go +++ b/client/context_test.go @@ -17,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/testdata" ) @@ -145,7 +146,7 @@ x: "10" } func TestCLIQueryConn(t *testing.T) { - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 n, err := network.New(t, t.TempDir(), cfg) @@ -159,7 +160,7 @@ func TestCLIQueryConn(t *testing.T) { } func TestGetFromFields(t *testing.T) { - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) path := hd.CreateHDPath(118, 0, 0).String() testCases := []struct { diff --git a/client/grpc/tmservice/service_test.go b/client/grpc/tmservice/service_test.go index 9f426b958680..14821a64dfb4 100644 --- a/client/grpc/tmservice/service_test.go +++ b/client/grpc/tmservice/service_test.go @@ -10,6 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/rest" "github.com/cosmos/cosmos-sdk/types" @@ -34,7 +35,7 @@ func TestIntegrationTestSuite(t *testing.T) { func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 s.cfg = cfg diff --git a/client/grpc_query_test.go b/client/grpc_query_test.go index faff1ad5dc64..6b6ca21cbe06 100644 --- a/client/grpc_query_test.go +++ b/client/grpc_query_test.go @@ -12,6 +12,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -29,7 +30,7 @@ func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") var err error - s.network, err = network.New(s.T(), s.T().TempDir(), network.DefaultConfig()) + s.network, err = network.New(s.T(), s.T().TempDir(), network.DefaultConfig(simapp.NewTestNetworkFixture)) s.Require().NoError(err) _, err = s.network.WaitForHeight(2) diff --git a/client/rpc/rpc_test.go b/client/rpc/rpc_test.go index 0b649b34d4fb..11a4ef2e4aa7 100644 --- a/client/rpc/rpc_test.go +++ b/client/rpc/rpc_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/client/rpc" + "github.com/cosmos/cosmos-sdk/simapp" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" ) @@ -21,7 +22,7 @@ func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") var err error - s.network, err = network.New(s.T(), s.T().TempDir(), network.DefaultConfig()) + s.network, err = network.New(s.T(), s.T().TempDir(), network.DefaultConfig(simapp.NewTestNetworkFixture)) s.Require().NoError(err) s.Require().NoError(s.network.WaitForNextBlock()) diff --git a/server/grpc/grpc_web_test.go b/server/grpc/grpc_web_test.go index 384b06453bad..12bc1fce8fe9 100644 --- a/server/grpc/grpc_web_test.go +++ b/server/grpc/grpc_web_test.go @@ -21,6 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -41,7 +42,7 @@ type GRPCWebTestSuite struct { func (s *GRPCWebTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 s.cfg = cfg diff --git a/server/grpc/server_test.go b/server/grpc/server_test.go index 5655d700c684..d7cd2b39be80 100644 --- a/server/grpc/server_test.go +++ b/server/grpc/server_test.go @@ -49,7 +49,7 @@ type IntegrationTestSuite struct { func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") s.app = simapp.Setup(s.T(), false) - s.cfg = network.DefaultConfig() + s.cfg = network.DefaultConfig(simapp.NewTestNetworkFixture) s.cfg.NumValidators = 1 var err error diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index 6bcc3924ddbc..ace2448a3e63 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -26,6 +26,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" @@ -484,7 +485,7 @@ func writeFile(name string, dir string, contents []byte) error { // startTestnet starts an in-process testnet func startTestnet(cmd *cobra.Command, args startArgs) error { - networkConfig := network.DefaultConfig() + networkConfig := network.DefaultConfig(simapp.NewTestNetworkFixture) // Default networkConfig.ChainID is random, and we should only override it if chainID provided // is non-empty diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index e3a1cf694c9b..5ae000294933 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -22,12 +22,16 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp/params" + servertypes "github.com/cosmos/cosmos-sdk/server/types" + simappparams "github.com/cosmos/cosmos-sdk/simapp/params" "github.com/cosmos/cosmos-sdk/testutil/mock" + "github.com/cosmos/cosmos-sdk/testutil/network" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -38,7 +42,7 @@ import ( type SetupOptions struct { Logger log.Logger DB *dbm.MemDB - EncConfig params.EncodingConfig + EncConfig simappparams.EncodingConfig AppOpts types.AppOptions } @@ -352,3 +356,29 @@ func ModuleAccountAddrs() map[string]bool { } return bk.GetBlockedAddresses() } + +// NewTestNetworkFixture returns a new simapp AppConstructor for network simulation tests +func NewTestNetworkFixture() network.TestFixture { + encodingCfg := MakeTestEncodingConfig() + cfg := testutil.TestEncodingConfig{ + TxConfig: encodingCfg.TxConfig, + Codec: encodingCfg.Codec, + Amino: encodingCfg.Amino, + InterfaceRegistry: encodingCfg.InterfaceRegistry, + } + appCtr := func(val testutil.Validator) servertypes.Application { + return NewSimApp( + val.GetCtx().Logger, dbm.NewMemDB(), nil, true, + encodingCfg, + simtestutil.NewAppOptionsWithFlagHome(val.GetCtx().Config.RootDir), + bam.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)), + bam.SetMinGasPrices(val.GetAppConfig().MinGasPrices), + ) + } + + return network.TestFixture{ + AppConstructor: appCtr, + GenesisState: ModuleBasics.DefaultGenesis(cfg.Codec), + EncodingConfig: cfg, + } +} diff --git a/testutil/network/network_test.go b/simapp/testutil_network_test.go similarity index 90% rename from testutil/network/network_test.go rename to simapp/testutil_network_test.go index c7b5e4291ccc..ae34608bcd74 100644 --- a/testutil/network/network_test.go +++ b/simapp/testutil_network_test.go @@ -1,7 +1,7 @@ //go:build norace // +build norace -package network_test +package simapp_test import ( "testing" @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" ) @@ -22,7 +23,7 @@ func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") var err error - s.network, err = network.New(s.T(), s.T().TempDir(), network.DefaultConfig()) + s.network, err = network.New(s.T(), s.T().TempDir(), network.DefaultConfig(simapp.NewTestNetworkFixture)) s.Require().NoError(err) h, err := s.network.WaitForHeight(1) diff --git a/testutil/key_test.go b/testutil/key_test.go index 5cf9eeef6314..799e2a0629f9 100644 --- a/testutil/key_test.go +++ b/testutil/key_test.go @@ -7,13 +7,13 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" ) func TestGenerateCoinKey(t *testing.T) { t.Parallel() - cdc := simapp.MakeTestEncodingConfig().Codec + cdc := testutil.MakeTestEncodingConfig().Codec addr, mnemonic, err := GenerateCoinKey(hd.Secp256k1, cdc) require.NoError(t, err) @@ -28,7 +28,7 @@ func TestGenerateCoinKey(t *testing.T) { func TestGenerateSaveCoinKey(t *testing.T) { t.Parallel() - encCfg := simapp.MakeTestEncodingConfig() + encCfg := testutil.MakeTestEncodingConfig() kb, err := keyring.New(t.Name(), "test", t.TempDir(), nil, encCfg.Codec) require.NoError(t, err) @@ -53,7 +53,7 @@ func TestGenerateSaveCoinKey(t *testing.T) { func TestGenerateSaveCoinKeyOverwriteFlag(t *testing.T) { t.Parallel() - encCfg := simapp.MakeTestEncodingConfig() + encCfg := testutil.MakeTestEncodingConfig() kb, err := keyring.New(t.Name(), "test", t.TempDir(), nil, encCfg.Codec) require.NoError(t, err) diff --git a/testutil/network/network.go b/testutil/network/network.go index dd37d270faff..c9fcb4ba643d 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -25,6 +25,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/math" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/baseapp" @@ -41,10 +42,7 @@ import ( "github.com/cosmos/cosmos-sdk/server/api" srvconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/simapp/params" "github.com/cosmos/cosmos-sdk/testutil" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -57,19 +55,13 @@ var lock = new(sync.Mutex) // AppConstructor defines a function which accepts a network configuration and // creates an ABCI Application to provide to Tendermint. -type AppConstructor = func(val Validator) servertypes.Application - -// NewAppConstructor returns a new simapp AppConstructor -func NewAppConstructor(encodingCfg params.EncodingConfig) AppConstructor { - return func(val Validator) servertypes.Application { - return simapp.NewSimApp( - val.Ctx.Logger, dbm.NewMemDB(), nil, true, - encodingCfg, - simtestutil.NewAppOptionsWithFlagHome(val.Ctx.Config.RootDir), - baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), - baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), - ) - } +type AppConstructor = func(val moduletestutil.Validator) servertypes.Application +type TestFixtureFactory = func() TestFixture + +type TestFixture struct { + AppConstructor AppConstructor + GenesisState map[string]json.RawMessage + EncodingConfig moduletestutil.TestEncodingConfig } // Config defines the necessary configuration used to bootstrap and start an @@ -105,17 +97,17 @@ type Config struct { // DefaultConfig returns a sane default configuration suitable for nearly all // testing requirements. -func DefaultConfig() Config { - encCfg := simapp.MakeTestEncodingConfig() +func DefaultConfig(factory TestFixtureFactory) Config { + fixture := factory() return Config{ - Codec: encCfg.Codec, - TxConfig: encCfg.TxConfig, - LegacyAmino: encCfg.Amino, - InterfaceRegistry: encCfg.InterfaceRegistry, + Codec: fixture.EncodingConfig.Codec, + TxConfig: fixture.EncodingConfig.TxConfig, + LegacyAmino: fixture.EncodingConfig.Amino, + InterfaceRegistry: fixture.EncodingConfig.InterfaceRegistry, AccountRetriever: authtypes.AccountRetriever{}, - AppConstructor: NewAppConstructor(encCfg), - GenesisState: simapp.ModuleBasics.DefaultGenesis(encCfg.Codec), + AppConstructor: fixture.AppConstructor, + GenesisState: fixture.GenesisState, TimeoutCommit: 2 * time.Second, ChainID: "chain-" + tmrand.Str(6), NumValidators: 4, @@ -133,8 +125,6 @@ func DefaultConfig() Config { } func DefaultConfigWithAppConfig(appConfig depinject.Config) (Config, error) { - cfg := DefaultConfig() - var ( appBuilder *runtime.AppBuilder txConfig client.TxConfig @@ -153,23 +143,26 @@ func DefaultConfigWithAppConfig(appConfig depinject.Config) (Config, error) { return Config{}, err } + cfg := DefaultConfig(func() TestFixture { + return TestFixture{} + }) cfg.Codec = cdc cfg.TxConfig = txConfig cfg.LegacyAmino = legacyAmino cfg.InterfaceRegistry = interfaceRegistry cfg.GenesisState = appBuilder.DefaultGenesis() - cfg.AppConstructor = func(val Validator) servertypes.Application { + cfg.AppConstructor = func(val moduletestutil.Validator) servertypes.Application { // we build a unique app instance for every validator here var appBuilder *runtime.AppBuilder if err := depinject.Inject(appConfig, &appBuilder); err != nil { panic(err) } app := appBuilder.Build( - val.Ctx.Logger, + val.GetCtx().Logger, dbm.NewMemDB(), nil, - baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), - baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), + baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)), + baseapp.SetMinGasPrices(val.GetAppConfig().MinGasPrices), ) if err := app.Load(true); err != nil { @@ -234,10 +227,19 @@ type Logger interface { } var ( - _ Logger = (*testing.T)(nil) - _ Logger = (*CLILogger)(nil) + _ Logger = (*testing.T)(nil) + _ Logger = (*CLILogger)(nil) + _ moduletestutil.Validator = Validator{} ) +func (v Validator) GetCtx() *server.Context { + return v.Ctx +} + +func (v Validator) GetAppConfig() *srvconfig.Config { + return v.AppConfig +} + // CLILogger wraps a cobra.Command and provides command logging methods. type CLILogger struct { cmd *cobra.Command diff --git a/types/module/testutil/network.go b/types/module/testutil/network.go new file mode 100644 index 000000000000..086f517adf9d --- /dev/null +++ b/types/module/testutil/network.go @@ -0,0 +1,12 @@ +package testutil + +import ( + "github.com/cosmos/cosmos-sdk/server" + srvconfig "github.com/cosmos/cosmos-sdk/server/config" +) + +// TODO rename +type Validator interface { + GetCtx() *server.Context + GetAppConfig() *srvconfig.Config +} diff --git a/x/auth/tx/service_test.go b/x/auth/tx/service_test.go index 23412fc67aca..eb7cc44f7b1d 100644 --- a/x/auth/tx/service_test.go +++ b/x/auth/tx/service_test.go @@ -19,6 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/rest" @@ -51,7 +52,7 @@ type IntegrationTestSuite struct { func (s *IntegrationTestSuite) SetupSuite() { s.T().Log("setting up integration test suite") - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 s.cfg = cfg diff --git a/x/authz/client/testutil/cli_test.go b/x/authz/client/testutil/cli_test.go index 5b3ef61c5a45..4bd59d02e52b 100644 --- a/x/authz/client/testutil/cli_test.go +++ b/x/authz/client/testutil/cli_test.go @@ -8,11 +8,12 @@ import ( "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" ) func TestIntegrationTestSuite(t *testing.T) { - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, NewIntegrationTestSuite(cfg)) } diff --git a/x/bank/client/testutil/cli_test.go b/x/bank/client/testutil/cli_test.go index 1035ca750264..26677c392c24 100644 --- a/x/bank/client/testutil/cli_test.go +++ b/x/bank/client/testutil/cli_test.go @@ -6,13 +6,14 @@ package testutil import ( "testing" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/stretchr/testify/suite" ) func TestIntegrationTestSuite(t *testing.T) { - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, NewIntegrationTestSuite(cfg)) } diff --git a/x/crisis/client/testsuite/cli_test.go b/x/crisis/client/testsuite/cli_test.go index 5b3ef61c5a45..4bd59d02e52b 100644 --- a/x/crisis/client/testsuite/cli_test.go +++ b/x/crisis/client/testsuite/cli_test.go @@ -8,11 +8,12 @@ import ( "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" ) func TestIntegrationTestSuite(t *testing.T) { - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, NewIntegrationTestSuite(cfg)) } diff --git a/x/genutil/client/testutil/cli_test.go b/x/genutil/client/testutil/cli_test.go index 1035ca750264..26677c392c24 100644 --- a/x/genutil/client/testutil/cli_test.go +++ b/x/genutil/client/testutil/cli_test.go @@ -6,13 +6,14 @@ package testutil import ( "testing" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/stretchr/testify/suite" ) func TestIntegrationTestSuite(t *testing.T) { - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, NewIntegrationTestSuite(cfg)) } diff --git a/x/gov/client/testutil/cli_test.go b/x/gov/client/testutil/cli_test.go index bd14e890a4d0..13d394e30eb5 100644 --- a/x/gov/client/testutil/cli_test.go +++ b/x/gov/client/testutil/cli_test.go @@ -4,6 +4,7 @@ import ( "testing" "time" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -13,7 +14,7 @@ import ( ) func TestIntegrationTestSuite(t *testing.T) { - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, NewIntegrationTestSuite(cfg)) diff --git a/x/mint/testutil/app_config.go b/x/mint/testutil/app_config.go index 5feaa9e2188e..6f9b5813553d 100644 --- a/x/mint/testutil/app_config.go +++ b/x/mint/testutil/app_config.go @@ -6,6 +6,7 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" _ "github.com/cosmos/cosmos-sdk/x/bank" _ "github.com/cosmos/cosmos-sdk/x/genutil" + _ "github.com/cosmos/cosmos-sdk/x/mint" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" diff --git a/x/nft/testutil/app_config.go b/x/nft/testutil/app_config.go index e00bd4898189..b93d56297796 100644 --- a/x/nft/testutil/app_config.go +++ b/x/nft/testutil/app_config.go @@ -7,6 +7,7 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/bank" _ "github.com/cosmos/cosmos-sdk/x/genutil" _ "github.com/cosmos/cosmos-sdk/x/mint" + _ "github.com/cosmos/cosmos-sdk/x/nft/module" _ "github.com/cosmos/cosmos-sdk/x/params" _ "github.com/cosmos/cosmos-sdk/x/staking" diff --git a/x/staking/client/testutil/cli_test.go b/x/staking/client/testutil/cli_test.go index f23e88847c30..b944e1f898fe 100644 --- a/x/staking/client/testutil/cli_test.go +++ b/x/staking/client/testutil/cli_test.go @@ -6,13 +6,14 @@ package testutil import ( "testing" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/stretchr/testify/suite" ) func TestIntegrationTestSuite(t *testing.T) { - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 2 suite.Run(t, NewIntegrationTestSuite(cfg)) } diff --git a/x/upgrade/client/testutil/cli_test.go b/x/upgrade/client/testutil/cli_test.go index 7f92bbeeff55..039ec3ee2f58 100644 --- a/x/upgrade/client/testutil/cli_test.go +++ b/x/upgrade/client/testutil/cli_test.go @@ -5,11 +5,12 @@ import ( "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/network" ) func TestIntegrationTestSuite(t *testing.T) { - cfg := network.DefaultConfig() + cfg := network.DefaultConfig(simapp.NewTestNetworkFixture) cfg.NumValidators = 1 suite.Run(t, NewIntegrationTestSuite(cfg)) }