-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating Version -> VersionPrefix, error msgs, validation tests
- Loading branch information
1 parent
d6725e1
commit 32240ff
Showing
10 changed files
with
56 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,12 +14,12 @@ func (suite *TypesTestSuite) TestValidateVersion() { | |
}{ | ||
{ | ||
"success", | ||
fmt.Sprint(types.Version, types.Delimiter, TestOwnerAddress), | ||
fmt.Sprint(types.VersionPrefix, types.Delimiter, TestOwnerAddress), | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
damiannolan
Author
Contributor
|
||
true, | ||
}, | ||
{ | ||
"success - version only", | ||
fmt.Sprint(types.Version), | ||
fmt.Sprint(types.VersionPrefix), | ||
true, | ||
}, | ||
{ | ||
|
@@ -28,18 +28,23 @@ func (suite *TypesTestSuite) TestValidateVersion() { | |
false, | ||
}, | ||
{ | ||
"invalid account address - 31 chars", | ||
fmt.Sprint(types.Version, types.Delimiter, "xtignpvthxbwxtmnzyfwhhywobaatlt"), | ||
"invalid account address - empty", | ||
fmt.Sprint(types.VersionPrefix, types.Delimiter, ""), | ||
false, | ||
}, | ||
{ | ||
"invalid account address - 65 chars", | ||
fmt.Sprint(types.Version, types.Delimiter, "ofwafxhdmqcdbpzvrccxkidbunrwyyoboyctignpvthxbwxtmnzyfwhhywobaatlt"), | ||
"invalid account address - exceeded character length", | ||
fmt.Sprint(types.VersionPrefix, types.Delimiter, "ofwafxhdmqcdbpzvrccxkidbunrwyyoboyctignpvthxbwxtmnzyfwhhywobaatltfwafxhdmqcdbpzvrccxkidbunrwyyoboyctignpvthxbwxtmnzyfwhhywobaatlt"), | ||
false, | ||
}, | ||
{ | ||
"invalid account address - non alphanumeric characters", | ||
fmt.Sprint(types.Version, types.Delimiter, "-_-"), | ||
fmt.Sprint(types.VersionPrefix, types.Delimiter, "-_-"), | ||
false, | ||
}, | ||
{ | ||
"invalid account address - address contains additional delimiter", | ||
fmt.Sprint(types.VersionPrefix, types.Delimiter, "cosmos17dtl0mjt3t77kpu|hg2edqzjpszulwhgzuj9ljs"), | ||
false, | ||
}, | ||
} | ||
|
super small nit, these can use
NewAppVersion