ipfs / go-ipld-format

IPLD Node and Resolver interfaces in Go
https://github.com/ipld/ipld
MIT License
64 stars 26 forks source link

Import DAG reader tests involving `NodePromise`s to actually test `NavigableIPLDNode` #50

Open schomatis opened 5 years ago

schomatis commented 5 years ago

The node prefetching mechanism has been abstracted away from the DAG reader in go-unixfs into the NavigableIPLDNode here, so the PR https://github.com/ipfs/go-unixfs/pull/12 which employs the Walker (that relies on NavigableIPLDNode) had to remove the related tests that acted directly on the internal NodePromise structure,

https://github.com/ipfs/go-unixfs/pull/12/files#diff-5a645da404e1845b770b90d1c81e71c6

Those tests should be recreated here (possibly without involving the DAG reader now, just testing the FetchChild and related methods of NavigableIPLDNode to actually create the NodePromises following the spirit of the original test).

bjzhang commented 5 years ago

Hi, @schomatis . I am interested in this work and reading the TestSeekAndReadLargeandTestReadAndCancel` in dagreader_test.go right now. Will come back here if there is some questions.