-
Notifications
You must be signed in to change notification settings - Fork 641
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 unwind + forwarding to sender test #6905
Conversation
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.
Thank you for the PR, @vishal-kanna. The test you added in this PR is not exactly what was meant in the issue. You should take a look at the tests in relay_forwarding_test.go
. The idea is to write an integration test like those. The setup of the test should send tokens from A to B and then on B we should set forwarding to types.NewForwarding(true, types.NewHop(pathAtoB.EndpointA.ChannelConfig.PortID, pathAtoB.EndpointA.ChannelID))
. This basically will send the tokens first back to A (unwind them) and them forward them back to chain B. Let us know if you have questions or need any help. Taking the tests in the file I mentioned as reference about should give you an idea of how to write the test.
@@ -56,7 +56,7 @@ func ParseChannelIDFromEvents(events []abci.Event) (string, error) { | |||
return "", errors.New("channel identifier event attribute not found") | |||
} | |||
|
|||
// ParsePacketFromEvents parses events emitted from a MsgRecvPacket and returns | |||
// ParsePacketFromEvents parses events emitted from a send packet and returns |
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.
Small typo fixed.
Co-authored-by: Nikolas De Giorgis <[email protected]>
* chore: added unit test * chore: added unit test * wip * take test to finish line * Update modules/apps/transfer/keeper/relay_forwarding_test.go Co-authored-by: Nikolas De Giorgis <[email protected]> * fix typo --------- Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Nikolas De Giorgis <[email protected]> (cherry picked from commit 3f34f29)
* chore: added unit test * chore: added unit test * wip * take test to finish line * Update modules/apps/transfer/keeper/relay_forwarding_test.go Co-authored-by: Nikolas De Giorgis <[email protected]> * fix typo --------- Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Nikolas De Giorgis <[email protected]> (cherry picked from commit 3f34f29) Co-authored-by: Vishal Potpelliwar <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]>
closes: #6878