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

chore: adding stop relayer func to e2e suite #2046

Merged
merged 6 commits into from
Aug 22, 2022

Conversation

damiannolan
Copy link
Member

@damiannolan damiannolan commented Aug 19, 2022

Description

closes: #1974


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

@@ -229,6 +229,12 @@ func (s *E2ETestSuite) StartRelayer(relayer ibc.Relayer) {
s.startRelayerFn(relayer)
}

// StopRelayer stops the given relayer.
func (s *E2ETestSuite) StopRelayer(ctx context.Context, relayer ibc.Relayer, eRep ibc.RelayerExecReporter) {
err := relayer.StopRelayer(ctx, eRep)
Copy link
Contributor

Choose a reason for hiding this comment

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

if we're creating a separate function then we can probably remove eRep as an argument

func (s *E2ETestSuite) StopRelayer(ctx context.Context, relayer ibc.Relayer) {
	err := relayer.StopRelayer(ctx, s.GetRelayerExecReporter())
        s.Require().NoError(err)
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch! I'll push an update.

I was thinking it might be an idea to eventually move the ctx onto the E2ETestSuite as well, as I think it's just being retrieved from context.TODO() in most test cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah atm it's just doing a passthrough to the ibctest functions, but I think having the context at the test level can be useful. It allows for things like timeouts and cancellations. (we just aren't using it for anything atm)

@crodriguezvega
Copy link
Contributor

Does this PR close #1974?

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!

Copy link
Contributor

@charleenfei charleenfei left a comment

Choose a reason for hiding this comment

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

lgtm!

@damiannolan damiannolan enabled auto-merge (squash) August 22, 2022 07:20
@damiannolan damiannolan merged commit aefc218 into main Aug 22, 2022
@damiannolan damiannolan deleted the damian/e2e-stop-relayer-helper branch August 22, 2022 09:08
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.

add s.StopRelayer function
4 participants