diff --git a/app/app_test.go b/app/app_test.go index f697359..44c4efc 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -25,7 +25,6 @@ import ( capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "cosmossdk.io/x/upgrade" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/cosmos/cosmos-sdk/x/bank" ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" @@ -67,7 +66,7 @@ func TestInitGenesisOnMigration(t *testing.T) { db := dbm.NewMemDB() logger := log.NewLogger(os.Stdout) app := NewMinitiaApp( - logger, db, nil, true, []wasmkeeper.Option{}, simtestutil.EmptyAppOptions{}) + logger, db, nil, true, []wasmkeeper.Option{}, EmptyAppOptions{}) ctx := app.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}) // Create a mock module. This module will serve as the new module we're @@ -122,7 +121,7 @@ func TestGetKey(t *testing.T) { db := dbm.NewMemDB() app := NewMinitiaApp( log.NewLogger(os.Stdout), - db, nil, true, []wasmkeeper.Option{}, simtestutil.EmptyAppOptions{}) + db, nil, true, []wasmkeeper.Option{}, EmptyAppOptions{}) require.NotEmpty(t, app.GetKey(banktypes.StoreKey)) require.NotEmpty(t, app.GetMemKey(capabilitytypes.MemStoreKey)) diff --git a/app/encoding.go b/app/encoding.go index 932c944..b163a7c 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -5,8 +5,8 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/client/flags" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" @@ -18,7 +18,7 @@ import ( // MakeEncodingConfig creates an EncodingConfig for testing func MakeEncodingConfig() params.EncodingConfig { - tempApp := NewMinitiaApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, []wasmkeeper.Option{}, simtestutil.EmptyAppOptions{}) + tempApp := NewMinitiaApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, []wasmkeeper.Option{}, EmptyAppOptions{}) encodingConfig := params.EncodingConfig{ InterfaceRegistry: tempApp.InterfaceRegistry(), Codec: tempApp.AppCodec(), @@ -30,7 +30,7 @@ func MakeEncodingConfig() params.EncodingConfig { } func AutoCliOpts() autocli.AppOptions { - tempApp := NewMinitiaApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, []wasmkeeper.Option{}, simtestutil.EmptyAppOptions{}) + tempApp := NewMinitiaApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, []wasmkeeper.Option{}, EmptyAppOptions{}) modules := make(map[string]appmodule.AppModule, 0) for _, m := range tempApp.ModuleManager.Modules { if moduleWithName, ok := m.(module.HasName); ok { @@ -51,6 +51,18 @@ func AutoCliOpts() autocli.AppOptions { } func BasicManager() module.BasicManager { - tempApp := NewMinitiaApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, []wasmkeeper.Option{}, simtestutil.EmptyAppOptions{}) + tempApp := NewMinitiaApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, []wasmkeeper.Option{}, EmptyAppOptions{}) return tempApp.BasicModuleManager } + +// EmptyAppOptions is a stub implementing AppOptions +type EmptyAppOptions struct{} + +// Get implements AppOptions +func (ao EmptyAppOptions) Get(o string) interface{} { + if o == flags.FlagHome { + return DefaultNodeHome + } + + return nil +} diff --git a/app/test_helpers.go b/app/test_helpers.go index a014280..0ffaf52 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -16,7 +16,6 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - 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" @@ -61,7 +60,7 @@ func setup(db *dbm.DB, withGenesis bool) (*MinitiaApp, GenesisState) { nil, true, []wasmkeeper.Option{}, - simtestutil.EmptyAppOptions{}, + EmptyAppOptions{}, ) if withGenesis {