Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding v4 -> v5 upgrade chain test #2143

Merged
merged 11 commits into from
Aug 31, 2022

Conversation

chatton
Copy link
Contributor

@chatton chatton commented Aug 30, 2022

Description

This PR adds a test which for now uses a hard coded version of v4 and v5 (from this pr)

We can update this to use the next v5 rc tag when the changes are included.

part of: #1908


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@chatton chatton changed the title Adding upgrade chain test Adding v4 -> v5 upgrade chain test Aug 30, 2022
@chatton chatton marked this pull request as ready for review August 30, 2022 11:50
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wahoo!

func (s *UpgradeTestSuite) TestV4ToV5ChainUpgrade() {
// TODO: temporarily hard code the version upgrades.
oldVersion := "v4.0.0"
targetVersion := "pr-2144" // v5 version with upgrade handler, replace with v5.0.0-rc3 when it is cut.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we would need to backport upgrade handlers for each version we want to test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep we won't be able to upgrade anything unless we have them.

chainA, _ := s.GetChains()

chainAUser := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount)
s.UpgradeChain(ctx, chainA, chainAUser, "normal upgrade", targetVersion)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess followup pr's can allow pre/post upgrade checks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think we can add before/after transfers in a follow up.

Copy link
Contributor

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, nice work! This will be so valuable

@chatton chatton enabled auto-merge (squash) August 31, 2022 11:14
@chatton chatton merged commit a83bcd5 into main Aug 31, 2022
@chatton chatton deleted the cian/issue#1908-support-e2e-software-upgrade-tests branch August 31, 2022 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants