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

Add message tests #136

Merged
merged 3 commits into from Sep 13, 2019
Merged

Add message tests #136

merged 3 commits into from Sep 13, 2019

Conversation

tac0turtle
Copy link
Member

@tac0turtle tac0turtle commented Sep 7, 2019

  • step 1 of adding testing to the tutorial

ref #13

Signed-off-by: Marko Baricevic marbar3778@yahoo.com

- step 1 of adding testing to the tutorial

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
@tac0turtle tac0turtle self-assigned this Sep 7, 2019
func TestMsgSetName(t *testing.T) {
name := "maTurtle"
value := "1"
acc := sdk.AccAddress([]byte("me"))
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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

Copy link
Contributor

@okwme okwme left a 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 👍

Copy link
Contributor

@hschoenburg hschoenburg left a comment

Choose a reason for hiding this comment

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

nice and straightforward!

@tac0turtle tac0turtle merged commit d637005 into master Sep 13, 2019
@tac0turtle tac0turtle deleted the marko/addmsgtests branch September 13, 2019 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants