-
Notifications
You must be signed in to change notification settings - Fork 374
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(gnoclient): Add Send support #1639
Conversation
Signed-off-by: Jeff Thompson <jeff@thefirst.org>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1639 +/- ##
==========================================
+ Coverage 56.12% 56.16% +0.04%
==========================================
Files 439 439
Lines 66185 66236 +51
==========================================
+ Hits 37144 37204 +60
+ Misses 26148 26142 -6
+ Partials 2893 2890 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
This looks good, but please add some unit tests 🙏
You can see examples for unit tests with how they're done for Call
.
Hi @leohhhn . I'm not clear on what the unit tests should check. You mention the unit tests using a Mock for gno/gno.land/pkg/gnoclient/client_test.go Line 108 in 2d4f3ae
But a MsgSend doesn't have a response. Instead, it changes the state of the blockchain which must be checked by an integration test which can track a state change. This is what I did. Since MsgSend doesn't have a response, what should a unit test do? |
In that case, I think adding tests that check the validity of the inputs for Something like the following test: gno/gno.land/pkg/gnoclient/client_test.go Line 181 in 2d4f3ae
Btw, while working on implementing this exact testing on the Run in my PR, I found a two small errors with how we validate the configs, for example here (should be |
Thanks for the details. I'll make unit tests to check for error conditions for invalid inputs. |
…d_Errors. Signed-off-by: Jeff Thompson <jeff@thefirst.org>
I added unit tests. |
Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com>
Signed-off-by: Jeff Thompson <jeff@thefirst.org>
gnoclient already supports MsgCall and MsgRun. This adds
Send
to support MsgSend.Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description