-
Notifications
You must be signed in to change notification settings - Fork 586
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
tests: add test for ReceiveEnabled set to false #6054
Conversation
WalkthroughWalkthroughThe recent update introduces two additional test cases within the Changes
Assessment against linked issues
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 (
|
}, false, false, | ||
}, | ||
{ | ||
"failure: receive is disabled - chainB is source", |
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.
I'm not familiar enough with the codebase to know if this case is needed. Happy to delete it in case it is not :)
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.
I think it's not strictly necessary but should do no harm in including it!
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.
I think I would remove just to keep it the test tight and clean, but will not fight over it. :)
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.
I removed it :) I was a bit on the verge, not being familiar enough with the codebase.
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (1)
- modules/apps/transfer/keeper/relay_test.go (1 hunks)
Additional comments: 1
modules/apps/transfer/keeper/relay_test.go (1)
- 340-358: The addition of test cases to verify the behavior when
ReceiveEnabled
is set to false is a valuable enhancement to the test suite. It's crucial to ensure that the system behaves as expected under these conditions, aligning with the operational requirements outlined in the linked issue Add tests cases for disabled IBC transfers #1913. These tests effectively simulate scenarios where receiving IBC transfers is disabled, contributing significantly to the robustness of the test suite.However, it's important to also verify the state of the system after the test execution, especially for the second test case where
expEscrowAmount
is set despite receiving being disabled. Ensure that the system's state aligns with expectations, such as checking if the escrow amount remains unchanged or if any other state variables are affected by the disabled receive functionality.
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 @bznein ❤️
}, false, false, | ||
}, | ||
{ | ||
"failure: receive is disabled - chainB is source", |
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.
I think it's not strictly necessary but should do no harm in including it!
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.
Thanks, @bznein!
}, false, false, | ||
}, | ||
{ | ||
"failure: receive is disabled - chainB is source", |
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.
I think I would remove just to keep it the test tight and clean, but will not fight over it. :)
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (1)
- modules/apps/transfer/keeper/relay_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- modules/apps/transfer/keeper/relay_test.go
Description
Adds a test for ReceiveEnabled set to false
closes: #1913
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
Summary by CodeRabbit
ReceiveEnabled
parameter.