-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
test: 82% coverage on blocks #3086
Conversation
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
u.Debug = true | ||
|
||
block, err = NewBlockWithHash(data, hash) | ||
if err == nil { |
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'd prefer to explicitly check errors in cases like this. I've had a few instances of tests passing while the code itself was breaking because a different error was being returned
One comment, otherwise LGTM |
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
@@ -11,6 +11,8 @@ import ( | |||
u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" | |||
) | |||
|
|||
var errWrongHash = errors.New("Data did not match given hash!") |
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.
export this for checking against outside of this package
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
Exposed. |
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
@whyrusleeping this is done, I just re-run travis tests, as at the time OSX tests were failing everywhere. |
License: MIT
Signed-off-by: Jakub Sztandera [email protected]