-
Notifications
You must be signed in to change notification settings - Fork 59
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
Round-trip storage/retrieval test #229
Conversation
* move TestPeerResolver to shared testutils * make everybody specify the path to their fixture file starting from root, so >1 package can use LoadUnixFSFile * export AllSelector * please the linter
7f53f8e
to
acf443b
Compare
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.
Looks good, probably there will be some code extraction once #192 lands...
@@ -7,7 +7,7 @@ import ( | |||
"github.com/ipld/go-ipld-prime/traversal/selector/builder" | |||
) | |||
|
|||
func allSelector() ipld.Node { | |||
func AllSelector() ipld.Node { |
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.
Seems like while you are exporting this, this is code snippet is used all over the place in tests and in the storage market...
Codecov Report
@@ Coverage Diff @@
## master #229 +/- ##
==========================================
+ Coverage 66.03% 66.43% +0.41%
==========================================
Files 40 39 -1
Lines 2269 2237 -32
==========================================
- Hits 1498 1486 -12
+ Misses 657 636 -21
- Partials 114 115 +1
Continue to review full report at Codecov.
|
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.
Thanks
Motivation
We need a storage-retrieval round trip integration test. Closes #74
Change Summary:
LoadUnixFSFile
have to specify the path to their fixture file, starting from package root, so it can be used more easily by different packages.More detail about the integration test:
This is essentially the combined storage and retrieval integration tests, with most assertions removed and the remaining ones converted to requires. For retrieval code, the integration test code is converted to use the test harness method in storage integration test, in particular so the LibP2PTestData can be shared from the storage to the retrieval harness, as well as other things such as the Payload CID, so that the stored file can be retrieved.