-
Notifications
You must be signed in to change notification settings - Fork 610
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: follow up for testing rest of methods on 07-tendermint light client module #6135
Conversation
…to-light-client-module-entry-points
…to-light-client-module-entry-points
…ient-module-entry-points' of github.com:cosmos/ibc-go into charly/issue#6001-move-client-state-testing-to-light-client-module-entry-points
…to-light-client-module-entry-points
…to-light-client-module-entry-points
…to-light-client-module-entry-points
…to-light-client-module-entry-points
…to-light-client-module-entry-points
…ient-module-entry-points' of github.com:cosmos/ibc-go into charly/issue#6001-move-client-state-testing-to-light-client-module-entry-points
…to-light-client-module-entry-points
WalkthroughThe update enhances the testing coverage of the Tendermint light client module by introducing a set of new test functions. These tests cover various scenarios related to client messages, state updates, validations of client and consensus states, paths, proofs, delays, and error conditions, aiming to improve the reliability and thoroughness of testing in the module. Changes
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @charleenfei
Do we still have metrics on code cov changes? Just curious that we still hit the same amount of lines of code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
|
||
// ensure counterparty state is committed | ||
suite.coordinator.CommitBlock(suite.chainB) | ||
trustedHeight := path.EndpointA.GetClientLatestHeight().(clienttypes.Height) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure type assertion is checked to prevent potential panics.
- trustedHeight := path.EndpointA.GetClientLatestHeight().(clienttypes.Height)
+ trustedHeight, ok := path.EndpointA.GetClientLatestHeight().(clienttypes.Height)
+ suite.Require().True(ok, "type assertion should not fail")
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
trustedHeight := path.EndpointA.GetClientLatestHeight().(clienttypes.Height) | |
trustedHeight, ok := path.EndpointA.GetClientLatestHeight().(clienttypes.Height) | |
suite.Require().True(ok, "type assertion should not fail") |
modules/light-clients/07-tendermint/light_client_module_test.go
Outdated
Show resolved
Hide resolved
modules/light-clients/07-tendermint/light_client_module_test.go
Outdated
Show resolved
Hide resolved
modules/light-clients/07-tendermint/light_client_module_test.go
Outdated
Show resolved
Hide resolved
modules/light-clients/07-tendermint/light_client_module_test.go
Outdated
Show resolved
Hide resolved
modules/light-clients/07-tendermint/light_client_module_test.go
Outdated
Show resolved
Hide resolved
modules/light-clients/07-tendermint/light_client_module_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left some nits, can push an update to address them!
Quality Gate passed for 'ibc-go'Issues Measures |
Description
closes: #6001
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.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.Summary by CodeRabbit
light_client_module_test.go
andupgrade_test.go
for improved coverage and validation of client and consensus states, paths, proofs, delays, and error conditions.