-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app): better upgrade management (#1488)
* feat: upgrades * fix: remove ineffassign * chore: rename apptesting -> testutil * chore: move ante handler in to app.go * chore: remove appconfig.go * chore: move test_helpers.go to testutil package * chore: rename test * fix: consolidate files, avoid import cycle * fix: fix test * fix: better test fix * fix: revert v3 state migration changes, fix in upgrade test Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com> Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
- Loading branch information
1 parent
cb2b624
commit ea2dd1b
Showing
9 changed files
with
270 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package testsuite | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/stretchr/testify/suite" | ||
|
||
"github.com/cosmos/cosmos-sdk/baseapp" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
tmtypes "github.com/tendermint/tendermint/proto/tendermint/types" | ||
|
||
"github.com/regen-network/regen-ledger/v4/app" | ||
) | ||
|
||
type UpgradeTestSuite struct { | ||
suite.Suite | ||
|
||
App *app.RegenApp | ||
Ctx sdk.Context | ||
QueryHelper *baseapp.QueryServiceTestHelper | ||
TestAccs []sdk.AccAddress | ||
} | ||
|
||
// Setup sets up basic environment for suite (App, Ctx, and test accounts) | ||
func (s *UpgradeTestSuite) Setup() { | ||
s.App = NewAppWithCustomOptions(s.T(), false, DefaultOptions()) | ||
s.Ctx = s.App.BaseApp.NewContext(false, tmtypes.Header{Height: 1, ChainID: "regen-1", Time: time.Now().UTC()}) | ||
s.QueryHelper = &baseapp.QueryServiceTestHelper{ | ||
GRPCQueryRouter: s.App.GRPCQueryRouter(), | ||
Ctx: s.Ctx, | ||
} | ||
|
||
s.TestAccs = CreateRandomAccounts(3) | ||
} |
Oops, something went wrong.