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
Add message tests #136
Add message tests #136
Conversation
- step 1 of adding testing to the tutorial Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
func TestMsgSetName(t *testing.T) { | ||
name := "maTurtle" | ||
value := "1" | ||
acc := sdk.AccAddress([]byte("me")) |
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.
not clear to me what's going on here. If you instantiate an address using an arbitrary byte string is that used as the private key?
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 is just creating a dummy account for testing. there is no need fo the priv key here, once we do simulaiton tests we will need to integrate something with priv key i believe
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 its ok not to use valid addresses here since the test is focused on the nameservice message
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.
would like to see more tests cover edge cases and actual errors but this is a great start 👍
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.
nice and straightforward!
a825886
to
ccd8b97
Compare
ref #13
Signed-off-by: Marko Baricevic marbar3778@yahoo.com