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

dag/get: fix link formatting in json output #3655

Merged
merged 1 commit into from
Feb 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/commands/dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

node "gx/ipfs/QmRSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16/go-ipld-node"
cid "gx/ipfs/QmcTcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD/go-cid"
ipldcbor "gx/ipfs/QmfMxth6d2po8YGrtSVyNb2u6SFNrPdAsWQoZG83oXRBqX/go-ipld-cbor"
ipldcbor "gx/ipfs/Qmf658QLDTXfRDgnGmUB6TYj671XjmHScG61p3g7dSxUcF/go-ipld-cbor"
)

var DagCmd = &cmds.Command{
Expand Down
2 changes: 1 addition & 1 deletion merkledag/merkledag.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
node "gx/ipfs/QmRSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16/go-ipld-node"
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
cid "gx/ipfs/QmcTcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD/go-cid"
ipldcbor "gx/ipfs/QmfMxth6d2po8YGrtSVyNb2u6SFNrPdAsWQoZG83oXRBqX/go-ipld-cbor"
ipldcbor "gx/ipfs/Qmf658QLDTXfRDgnGmUB6TYj671XjmHScG61p3g7dSxUcF/go-ipld-cbor"
)

var log = logging.Logger("merkledag")
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@
},
{
"author": "whyrusleeping",
"hash": "QmfMxth6d2po8YGrtSVyNb2u6SFNrPdAsWQoZG83oXRBqX",
"hash": "Qmf658QLDTXfRDgnGmUB6TYj671XjmHScG61p3g7dSxUcF",
"name": "go-ipld-cbor",
"version": "1.0.0"
"version": "1.1.0"
},
{
"author": "lgierth",
Expand Down
13 changes: 13 additions & 0 deletions test/sharness/t0053-dag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ test_dag_cmd() {
ipfs refs -r --timeout=2s $EXPHASH > /dev/null
'

test_expect_success "can get object" '
ipfs dag get $IPLDHASH > ipld_obj_out
'

test_expect_success "object links look right" '
grep "{\"/\":\"" ipld_obj_out > /dev/null
'

test_expect_success "retreived object hashes back correctly" '
IPLDHASH2=$(cat ipld_obj_out | ipfs dag put) &&
test "$IPLDHASH" = "$IPLDHASH2"
'

test_expect_success "add a normal file" '
HASH=$(echo "foobar" | ipfs add -q)
'
Expand Down