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

test: 82% coverage on blocks #3086

Merged
merged 4 commits into from
Aug 18, 2016
Merged

test: 82% coverage on blocks #3086

merged 4 commits into from
Aug 18, 2016

Conversation

Kubuxu
Copy link
Member

@Kubuxu Kubuxu commented Aug 15, 2016

License: MIT
Signed-off-by: Jakub Sztandera kubuxu@protonmail.ch

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
u.Debug = true

block, err = NewBlockWithHash(data, hash)
if err == nil {
Copy link
Member

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

@whyrusleeping
Copy link
Member

One comment, otherwise LGTM

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@ipfs.io>
@@ -11,6 +11,8 @@ import (
u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util"
)

var errWrongHash = errors.New("Data did not match given hash!")
Copy link
Member

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 <kubuxu@protonmail.ch>
@Kubuxu
Copy link
Member Author

Kubuxu commented Aug 16, 2016

Exposed.

@Kubuxu Kubuxu added the need/review Needs a review label Aug 16, 2016
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
@whyrusleeping whyrusleeping added the status/in-progress In progress label Aug 18, 2016
@Kubuxu Kubuxu removed the status/in-progress In progress label Aug 18, 2016
@Kubuxu
Copy link
Member Author

Kubuxu commented Aug 18, 2016

@whyrusleeping this is done, I just re-run travis tests, as at the time OSX tests were failing everywhere.

@whyrusleeping whyrusleeping merged commit 01ffc15 into master Aug 18, 2016
@whyrusleeping whyrusleeping deleted the feat/test-cover-blocks branch August 18, 2016 23:45
@ghost ghost mentioned this pull request Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants