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: add UpdateConnection to endpoint and update usages in tests. #5719

Merged
merged 6 commits into from
Jan 30, 2024

Conversation

DimitrisJim
Copy link
Contributor

Description

closes: #3985

Commit Message / Changelog Entry

test: add UpdateConnection to endpoint.

see the guidelines for commit messages. (view raw markdown for examples)


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/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

testing/endpoint.go Show resolved Hide resolved
connection := endpoint.GetConnection()
updater(&connection)

endpoint.SetConnection(connection)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

don't need to commit and update client as original issue had. Lmk if it would be good to add for some reason.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's only necessary if we need to generate a proof on the modified connection

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you think its beneficial to slip it back in? don't currently do that atm but maybe in futureland?

Copy link
Member

Choose a reason for hiding this comment

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

I think it could be done manually when required

@DimitrisJim DimitrisJim added the testing Testing package and unit/integration tests label Jan 24, 2024
@DimitrisJim DimitrisJim changed the title Add UpdateConnection to endpoint and update usages in tests. test: add UpdateConnection to endpoint and update usages in tests. Jan 25, 2024
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, I really like how much code can be refactored to use the new fn ❤️

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.

A long awaited feature! 😃 I love the improvement!! Are there any extra functions we should deprecate/remove now?

testing/endpoint.go Show resolved Hide resolved
connection := endpoint.GetConnection()
updater(&connection)

endpoint.SetConnection(connection)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's only necessary if we need to generate a proof on the modified connection

modules/core/04-channel/keeper/packet_test.go Outdated Show resolved Hide resolved
@DimitrisJim
Copy link
Contributor Author

Are there any extra functions we should deprecate/remove now?

Not for connection case thankfully! Only for channel updating func!

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7e88167) 81.54% compared to head (15c71df) 81.50%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5719      +/-   ##
==========================================
- Coverage   81.54%   81.50%   -0.04%     
==========================================
  Files         199      199              
  Lines       15225    15225              
==========================================
- Hits        12415    12409       -6     
- Misses       2344     2349       +5     
- Partials      466      467       +1     

see 1 file with indirect coverage changes

Copy link
Member

@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.

LGTM! Nice work @DimitrisJim :)

connection := endpoint.GetConnection()
updater(&connection)

endpoint.SetConnection(connection)
Copy link
Member

Choose a reason for hiding this comment

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

I think it could be done manually when required

@DimitrisJim DimitrisJim merged commit f64de8e into main Jan 30, 2024
65 checks passed
@DimitrisJim DimitrisJim deleted the jim/3985-add-upgdate-connection-to-endpoint branch January 30, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Testing package and unit/integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add UpdateConnection to endpoint
5 participants