Skip to content

Commit

Permalink
fix upgrades test 402
Browse files Browse the repository at this point in the history
  • Loading branch information
spoo-bar committed Sep 19, 2023
1 parent 383d615 commit f574495
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/upgrades/4_0_2/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const (
)

func (suite *UpgradeTestSuite) TestUpgrade() {
keepers := suite.archway.GetApp().Keepers
testCases := []struct {
name string
pre_upgrade func()
Expand All @@ -40,7 +39,7 @@ func (suite *UpgradeTestSuite) TestUpgrade() {
{
"Feecollector does not have burn permissions, we ensure upgrade happens and account gets the burn permissions",
func() {
accountKeeper := keepers.AccountKeeper
accountKeeper := suite.archway.GetApp().Keepers.AccountKeeper
fcAccount := accountKeeper.GetModuleAccount(suite.archway.GetContext(), authtypes.FeeCollectorName)

account, ok := fcAccount.(*authtypes.ModuleAccount)
Expand All @@ -52,20 +51,20 @@ func (suite *UpgradeTestSuite) TestUpgrade() {
suite.Require().False(fcAccount.HasPermission(authtypes.Burner))
},
func() {
accountKeeper := keepers.AccountKeeper
accountKeeper := suite.archway.GetApp().Keepers.AccountKeeper
fcAccount := accountKeeper.GetModuleAccount(suite.archway.GetContext(), authtypes.FeeCollectorName)
suite.Require().True(fcAccount.HasPermission(authtypes.Burner))
},
},
{
"Feecollector already has burn permissions, we ensure upgrade happens smoothly",
func() {
accountKeeper := keepers.AccountKeeper
accountKeeper := suite.archway.GetApp().Keepers.AccountKeeper
fcAccount := accountKeeper.GetModuleAccount(suite.archway.GetContext(), authtypes.FeeCollectorName)
suite.Require().True(fcAccount.HasPermission(authtypes.Burner))
},
func() {
accountKeeper := keepers.AccountKeeper
accountKeeper := suite.archway.GetApp().Keepers.AccountKeeper
fcAccount := accountKeeper.GetModuleAccount(suite.archway.GetContext(), authtypes.FeeCollectorName)
suite.Require().True(fcAccount.HasPermission(authtypes.Burner))
},
Expand All @@ -80,7 +79,7 @@ func (suite *UpgradeTestSuite) TestUpgrade() {

ctx := suite.archway.GetContext().WithBlockHeight(dummyUpgradeHeight - 1)
plan := upgradetypes.Plan{Name: "v4.0.2", Height: dummyUpgradeHeight}
upgradekeeper := keepers.UpgradeKeeper
upgradekeeper := suite.archway.GetApp().Keepers.UpgradeKeeper
err := upgradekeeper.ScheduleUpgrade(ctx, plan)
suite.Require().NoError(err)
_, exists := upgradekeeper.GetUpgradePlan(ctx)
Expand Down

0 comments on commit f574495

Please sign in to comment.