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

test: e2e upgrade tests for v8 -> v9 #6791

Merged
merged 6 commits into from
Jul 10, 2024

Conversation

gjermundgaraba
Copy link
Contributor

Description

Related to #6642

First two tests for v8->v9 upgrade


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 the 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 and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

}

// GRPCQueryWithMethod queries the chain with a query request with a specific method (grpc path) and deserializes the response to T
func GRPCQueryWithMethod[T any](ctx context.Context, chain ibc.Chain, req proto.Message, method string, opts ...grpc.CallOption) (*T, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to add this, because the v2 query path is not standard and I think it is better to send in the path rather than have a bunch of ifs here.

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

upgrade tests are looking great!

We need to make sure we add them to this workflow though.

Currently they are running on this PR because the upgrade test files have changed, but if we want to explicitly trigger upgrade tests, we'll need to add them to that file also!

e2e/tests/upgrades/upgrade_test.go Outdated Show resolved Hide resolved
@@ -1031,6 +1040,251 @@ func (s *UpgradeTestSuite) TestV8ToV8_1ChainUpgrade_ChannelUpgrades() {
})
}

func (s *UpgradeTestSuite) TestV8ToV9ChainUpgrade() {
Copy link
Contributor

Choose a reason for hiding this comment

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

not something for today, but it seems like it could be a good idea to parameterize these upgrade tests. It looks like a lot of them are 90% the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about that as well. Another thing I was thinking about was this notion of conformance test that exists in interhcaintest today. If we had a reasonable set of conformance tests we could potentially run them before and after an upgrade and ensure many things at once.

Copy link
Contributor

Choose a reason for hiding this comment

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

one of the things I've been thinking about a bit is basically extracting re-usable fns from our existing E2Es and making the actual test cases super short, something like

   PerformTransferV1(chainA, chainB)  
   UpgradeChain(chainA, newVersion)
   PerformTransferV2(chainA, chainB)

Think it will be possible to reduce a huge amount of duplication in the E2Es.

e2e/tests/upgrades/upgrade_test.go Outdated Show resolved Hide resolved
e2e/tests/upgrades/upgrade_test.go Outdated Show resolved Hide resolved
Copy link

@gjermundgaraba gjermundgaraba requested a review from chatton July 10, 2024 09:56
@gjermundgaraba
Copy link
Contributor Author

upgrade tests are looking great!

We need to make sure we add them to this workflow though.

Currently they are running on this PR because the upgrade test files have changed, but if we want to explicitly trigger upgrade tests, we'll need to add them to that file also!

I've added them now, let me know if it looks correct

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

LGTM! Great job with these 💪

@gjermundgaraba gjermundgaraba added the priority PRs that need prompt reviews label Jul 10, 2024
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.

Nice, good stuff! 🙏🏻

@gjermundgaraba gjermundgaraba added this pull request to the merge queue Jul 10, 2024
Merged via the queue into main with commit 575902b Jul 10, 2024
157 checks passed
@gjermundgaraba gjermundgaraba deleted the gjermund/6642-add-v8-to-v9-upgrade-tests branch July 10, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority PRs that need prompt reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants