Skip to content

Commit

Permalink
chore: fix test app_after_import_test new app function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
JeancarloBarrios committed Jun 26, 2024
1 parent d3836f2 commit c76d259
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions app/simulation/app_after_import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ import (
"testing"

abci "github.com/cometbft/cometbft/abci/types"
"github.com/cometbft/cometbft/libs/log"
"github.com/stretchr/testify/require"

simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"
simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli"

regen "github.com/regen-network/regen-ledger/v5/app"
Expand All @@ -32,17 +29,7 @@ func TestAppAfterImport(t *testing.T) {
require.NoError(t, os.RemoveAll(dir))
}()

app := regen.NewRegenApp(
logger,
db,
nil,
true,
map[int64]bool{},
regen.DefaultNodeHome,
simcli.FlagPeriodValue,
simtestutil.EmptyAppOptions{},
fauxMerkleModeOpt,
)
app := regen.NewRegenApp(logger, db, nil, true, simcli.FlagPeriodValue, simtestutil.EmptyAppOptions{})
require.Equal(t, regen.AppName, app.Name())

// run randomized simulation
Expand All @@ -64,7 +51,7 @@ func TestAppAfterImport(t *testing.T) {

fmt.Printf("exporting genesis...\n")

exported, err := app.ExportAppStateAndValidators(true, []string{})
exported, err := app.ExportAppStateAndValidators(true, []string{}, []string{})
require.NoError(t, err)

fmt.Printf("importing genesis...\n")
Expand All @@ -77,17 +64,7 @@ func TestAppAfterImport(t *testing.T) {
require.NoError(t, os.RemoveAll(newDir))
}()

newApp := regen.NewRegenApp(
log.NewNopLogger(),
newDB,
nil,
true,
map[int64]bool{},
regen.DefaultNodeHome,
simcli.FlagPeriodValue,
simtestutil.EmptyAppOptions{},
fauxMerkleModeOpt,
)
newApp := regen.NewRegenApp(logger, db, nil, true, simcli.FlagPeriodValue, simtestutil.EmptyAppOptions{})
require.Equal(t, regen.AppName, newApp.Name())

newApp.InitChain(abci.RequestInitChain{
Expand Down

0 comments on commit c76d259

Please sign in to comment.