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: 80% coverage of unixfs/io [WIP] #3097

Merged
merged 11 commits into from
Sep 12, 2016
Merged

Conversation

Kubuxu
Copy link
Member

@Kubuxu Kubuxu commented Aug 18, 2016

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

@Kubuxu Kubuxu added the status/in-progress In progress label Aug 18, 2016
context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)

func getMockDagServ(t testing.TB) mdag.DAGService {
Copy link
Member

Choose a reason for hiding this comment

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

i would just use merkledag/test.Mock() for this

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks.

@whyrusleeping
Copy link
Member

maybe some of this testing utility code can be combined into a package and reused across different test suites

@Kubuxu
Copy link
Member Author

Kubuxu commented Aug 18, 2016

Yeah, I might do that, unfortunately in many cases cyclic imports might be a problem.

@whyrusleeping
Copy link
Member

@Kubuxu have an example of a cyclic import issue?

@Kubuxu
Copy link
Member Author

Kubuxu commented Aug 18, 2016

If we wanted to extract it outside of the unixfs package, otherwise it will be good.

@Kubuxu Kubuxu force-pushed the test/unixfs/reader-cover branch 2 times, most recently from 8fba8c2 to 00a2f0c Compare August 18, 2016 21:42
@Kubuxu Kubuxu self-assigned this Aug 20, 2016
@Kubuxu Kubuxu force-pushed the test/unixfs/reader-cover branch 2 times, most recently from 4a3d857 to ded5cc9 Compare August 20, 2016 23:12
@whyrusleeping
Copy link
Member

@Kubuxu is this ready for review? title still has WIP

@Kubuxu
Copy link
Member Author

Kubuxu commented Aug 23, 2016

It is still WIP, it is at about 70% right now.

@Kubuxu
Copy link
Member Author

Kubuxu commented Sep 8, 2016

=== RUN   TestBasicRead
--- PASS: TestBasicRead (0.00s)
=== RUN   TestSeekAndRead
--- PASS: TestSeekAndRead (0.00s)
=== RUN   TestRelativeSeek
--- PASS: TestRelativeSeek (0.01s)
=== RUN   TestTypeFailures
--- PASS: TestTypeFailures (0.00s)
=== RUN   TestBadPBData
--- PASS: TestBadPBData (0.00s)
=== RUN   TestMetadataNode
--- PASS: TestMetadataNode (0.00s)
=== RUN   TestWriteTo
--- PASS: TestWriteTo (0.00s)
=== RUN   TestReaderSzie
--- PASS: TestReaderSzie (0.00s)
=== RUN   TestEmptyNode
--- PASS: TestEmptyNode (0.00s)
=== RUN   TestDirBuilder
--- PASS: TestDirBuilder (0.00s)
PASS
coverage: 81.7% of statements
ok      github.com/ipfs/go-ipfs/unixfs/io   1.026s

@Kubuxu Kubuxu added need/review Needs a review and removed status/in-progress In progress labels Sep 8, 2016
@whyrusleeping
Copy link
Member

@Kubuxu gotta rebase this one

@whyrusleeping whyrusleeping added need/author-input Needs input from the original author and removed need/review Needs a review labels Sep 9, 2016
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
move tests to different file

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
@Kubuxu
Copy link
Member Author

Kubuxu commented Sep 12, 2016

Rebased

@Kubuxu Kubuxu added need/review Needs a review and removed need/author-input Needs input from the original author labels Sep 12, 2016
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
@whyrusleeping
Copy link
Member

LGTM, thanks!

@whyrusleeping whyrusleeping merged commit 87517b7 into master Sep 12, 2016
@whyrusleeping whyrusleeping deleted the test/unixfs/reader-cover branch September 12, 2016 21:34
@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