Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tac0turtle
Copy link
Contributor

@tac0turtle tac0turtle commented Sep 7, 2019

  • step 1 of adding testing to the tutorial

ref #13

Signed-off-by: Marko Baricevic [email protected]

- step 1 of adding testing to the tutorial

Signed-off-by: Marko Baricevic <[email protected]>
@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
Contributor 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.

3 participants