This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
test: add test for retrieving an empty block #308
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
License: MIT Signed-off-by: Alan Shaw <[email protected]>
ghost
assigned alanshaw
Jun 21, 2018
ghost
added
the
in progress
label
Jun 21, 2018
alanshaw
added a commit
to ipfs/js-ipfs
that referenced
this pull request
Jun 21, 2018
This PR allows the test in ipfs-inactive/interface-js-ipfs-core#308 to pass. X-Stream-Output header is added to block.get reply for parity with go-ipfs. block.put is altered to allow an empty block to be put (again for fetaure parity with go-ipfs) but only if there is a multipart file part for it. Error responses have also been improved. refs ipfs-inactive/js-ipfs-http-client#789 tested by ipfs-inactive/interface-js-ipfs-core#308 License: MIT Signed-off-by: Alan Shaw <[email protected]>
This was referenced Jun 21, 2018
travisperson
approved these changes
Jun 21, 2018
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.
LGTM
One side note: Should this assert the CID of an empty block? It should be consistent across implementations so it seems like it might be worth adding.
Yes, perhaps as a separate test in |
Ah yes, that can come in later. Missed that this was a |
ghost
removed
the
in progress
label
Jun 22, 2018
alanshaw
added a commit
that referenced
this pull request
Jun 22, 2018
Added originally in #308 License: MIT Signed-off-by: Alan Shaw <[email protected]>
alanshaw
added a commit
to ipfs/js-ipfs
that referenced
this pull request
Jun 26, 2018
* fix: allow put empty block & add X-Stream-Output header on get This PR allows the test in ipfs-inactive/interface-js-ipfs-core#308 to pass. X-Stream-Output header is added to block.get reply for parity with go-ipfs. block.put is altered to allow an empty block to be put (again for fetaure parity with go-ipfs) but only if there is a multipart file part for it. Error responses have also been improved. refs ipfs-inactive/js-ipfs-http-client#789 tested by ipfs-inactive/interface-js-ipfs-core#308 License: MIT Signed-off-by: Alan Shaw <[email protected]> * chore: update interface-ipfs-core dependency License: MIT Signed-off-by: Alan Shaw <[email protected]> * chore: update ipfs-api dependency License: MIT Signed-off-by: Alan Shaw <[email protected]> * chore: fix the hack, open the repo not the datastore License: MIT Signed-off-by: Alan Shaw <[email protected]>
alanshaw
added a commit
that referenced
this pull request
Jun 26, 2018
Added originally in #308 License: MIT Signed-off-by: Alan Shaw <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add an empty block and ensure we can get it back successfully. Test for ipfs-inactive/js-ipfs-http-client#789