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

ipfs add: added size to response of ipfs add command #4082

Merged
merged 2 commits into from
Jul 29, 2017

Conversation

te0d
Copy link
Contributor

@te0d te0d commented Jul 19, 2017

The ipfs add command was modified to include the added
node's size as a string. The size is included in the
dagnode info sent over the output channel.

License: MIT
Signed-off-by: Tom O'Donnell todonnel91@gmail.com

@te0d te0d closed this Jul 19, 2017
@te0d te0d reopened this Jul 19, 2017
@te0d
Copy link
Contributor Author

te0d commented Jul 19, 2017

Fixes: #4008

The `ipfs add` command was modified to include the added
node's size as a string. The size is included in the
dagnode info sent over the output channel.

License: MIT
Signed-off-by: Tom O'Donnell <todonnel91@gmail.com>
@whyrusleeping
Copy link
Member

@te0d thanks! This looks great. I'd like to have a test for this. @Kubuxu can you think of a simple way to test this? ipfs add --enc=json doesnt give the output we want here (note: this seems kinda broken).

@Kubuxu
Copy link
Member

Kubuxu commented Jul 23, 2017

curl -F file=@filename "http://localhost:5001/api/v0/add" should work and returns JSON

@te0d
Copy link
Contributor Author

te0d commented Jul 24, 2017

Would https://gist.github.com/te0d/fcdfc0d1578fc3bcb7d1fed36c2a260b meet testing needs? Is the test in the appropriate location (../test/sharness/t0410-api-add.sh)?

@whyrusleeping
Copy link
Member

@te0d I'd at least like to make sure we verify the value thats returned is correct, but yeah, thats pretty much what i'm hoping for

Added test case which greps the `ipfs add` api call,
checking that it outputs the added item's size.

License: MIT
Signed-off-by: Tom O'Donnell <todonnell91@gmail.com>
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

LGTM

@whyrusleeping whyrusleeping merged commit 02dc260 into ipfs:master Jul 29, 2017
@daviddias
Copy link
Member

wooooot! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants