Skip to content

Commit

Permalink
chore: rollback original bank module tests in TestRunMigrations
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeseung-bae committed Mar 19, 2024
1 parent 503ac51 commit 2670c5c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions simapp/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,19 @@ func TestRunMigrations(t *testing.T) {
true, "module migration versions should start at 1: invalid version", false, "", 0,
},
{
"can register 1->2 migration handler for x/bank, can run migration",
"throws error on RunMigrations if no migration registered for bank",
"", 1, 2,
false, "", true, "no migrations found for module bank: not found", 0,
},
{
"can register 1->2 migration handler for x/bank, cannot run migration",
"bank", 1, 2,
false, "", false, "", 0,
false, "", true, "no migration found for module bank from version 2 to version 3: not found", 0,
},
{
"can register 2->3 migration handler for x/bank, can run migration",
"bank", 2, bank.AppModule{}.ConsensusVersion(),
false, "", false, "", int(bank.AppModule{}.ConsensusVersion() - 2), // minus 2 because 1-2 is run in the previous test case.
},
{
"cannot register migration handler for same module & fromVersion",
Expand Down

0 comments on commit 2670c5c

Please sign in to comment.