Skip to content

chore: adding stop relayer func to e2e suite#2046

Merged
damiannolan merged 6 commits intomainfrom
damian/e2e-stop-relayer-helper
Aug 22, 2022
Merged

chore: adding stop relayer func to e2e suite#2046
damiannolan merged 6 commits intomainfrom
damian/e2e-stop-relayer-helper

Conversation

@damiannolan
Copy link
Contributor

@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


// 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
Contributor 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