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 for HandleCompleteSend #672

Merged

Conversation

DongLieu
Copy link
Contributor

@DongLieu DongLieu commented Oct 6, 2023

1. Summary

Fixes #617

2.Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

3. Implementation details

4. How to test/use

5. Checklist

  • Does the Readme need to be updated?

6. Limitations (optional)

7. Future Work (optional)

ToAddress: zone.DelegationAddress.Address,
Amount: sdk.NewCoins(sdk.NewCoin(zone.BaseDenom, sdk.NewInt(1_000_000))),
},
memo: fmt.Sprintf("unbondSend/%d", complete.Unix()),
Copy link
Contributor

Choose a reason for hiding this comment

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

this is an invlaid memo for a send from deposit -> delegation (it will probably work, but the unbondSend/xxxx memo is always from delegate -> recipient of unbonded tokens)

joe-bowman
joe-bowman previously approved these changes Oct 8, 2023
Copy link
Contributor

@joe-bowman joe-bowman left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov
Copy link

codecov bot commented Oct 8, 2023

Codecov Report

Merging #672 (2405b1c) into main (0d7bd7a) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #672      +/-   ##
==========================================
+ Coverage   13.97%   14.00%   +0.03%     
==========================================
  Files         243      243              
  Lines       63049    63049              
==========================================
+ Hits         8812     8832      +20     
+ Misses      53525    53503      -22     
- Partials      712      714       +2     
Flag Coverage Δ
unittests 14.00% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

@joe-bowman
Copy link
Contributor

Requires linitng.

@DongLieu
Copy link
Contributor Author

DongLieu commented Oct 9, 2023

Ok!

@@ -2862,6 +2863,78 @@ func (suite *KeeperTestSuite) TestGetValidatorForToken() {
}
}

func (suite *KeeperTestSuite) TestHandleCompleteSend() {
suite.Run("TestHandleCompleteSend", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey plz move this setup after line 2917 so we can know the name of each test case when we can run the testing

joe-bowman
joe-bowman previously approved these changes Oct 26, 2023
Copy link
Contributor

@joe-bowman joe-bowman left a comment

Choose a reason for hiding this comment

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

lgtm

anhductn2001
anhductn2001 previously approved these changes Oct 27, 2023
Copy link
Contributor

@ThanhNhann ThanhNhann left a comment

Choose a reason for hiding this comment

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

Left some suggestions, overall lgtm! thank @DongLieu

x/interchainstaking/keeper/ibc_packet_handlers_test.go Outdated Show resolved Hide resolved
x/interchainstaking/keeper/ibc_packet_handlers_test.go Outdated Show resolved Hide resolved
x/interchainstaking/keeper/ibc_packet_handlers_test.go Outdated Show resolved Hide resolved
@DongLieu DongLieu dismissed stale reviews from anhductn2001 and joe-bowman via c228784 October 27, 2023 03:36
@DongLieu
Copy link
Contributor Author

Ok
Thanks @ThanhNhann

@ThanhNhann ThanhNhann merged commit 8d361ad into quicksilver-zone:main Oct 27, 2023
11 checks passed
@ThanhNhann ThanhNhann deleted the dong/TestsHandleCompleteSend branch October 27, 2023 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants