File tree 4 files changed +18
-9
lines changed
4 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 9
9
path "github.com/ipfs/go-ipfs/path"
10
10
11
11
node "gx/ipfs/QmRSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16/go-ipld-node"
12
- ipldcbor "gx/ipfs/QmbuuwTd9x4NReZ7sxtiKk7wFcfDUo54MfWBdtF5MRCPGR/go-ipld-cbor"
13
12
cid "gx/ipfs/QmcTcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD/go-cid"
13
+ ipldcbor "gx/ipfs/QmfMxth6d2po8YGrtSVyNb2u6SFNrPdAsWQoZG83oXRBqX/go-ipld-cbor"
14
14
)
15
15
16
16
var DagCmd = & cmds.Command {
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ import (
13
13
14
14
node "gx/ipfs/QmRSU5EqqWVZSNdbU51yXmVoF1uNw3JgTNB6RaiL7DZM16/go-ipld-node"
15
15
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
16
- ipldcbor "gx/ipfs/QmbuuwTd9x4NReZ7sxtiKk7wFcfDUo54MfWBdtF5MRCPGR/go-ipld-cbor"
17
16
cid "gx/ipfs/QmcTcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD/go-cid"
17
+ ipldcbor "gx/ipfs/QmfMxth6d2po8YGrtSVyNb2u6SFNrPdAsWQoZG83oXRBqX/go-ipld-cbor"
18
18
)
19
19
20
20
var log = logging .Logger ("merkledag" )
Original file line number Diff line number Diff line change 272
272
},
273
273
{
274
274
"author" : " whyrusleeping" ,
275
- "hash" : " QmbuuwTd9x4NReZ7sxtiKk7wFcfDUo54MfWBdtF5MRCPGR " ,
275
+ "hash" : " QmfMxth6d2po8YGrtSVyNb2u6SFNrPdAsWQoZG83oXRBqX " ,
276
276
"name" : " go-ipld-cbor" ,
277
- "version" : " 0.4.2 "
277
+ "version" : " 1.0.0 "
278
278
},
279
279
{
280
280
"author" : " lgierth" ,
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ test_expect_success "make a few test files" '
15
15
echo "bar" > file2 &&
16
16
echo "baz" > file3 &&
17
17
echo "qux" > file4 &&
18
- HASH1=$(ipfs add -q file1) &&
19
- HASH2=$(ipfs add -q file2) &&
20
- HASH3=$(ipfs add -q file3) &&
21
- HASH4=$(ipfs add -q file4)
18
+ HASH1=$(ipfs add --pin=false - q file1) &&
19
+ HASH2=$(ipfs add --pin=false - q file2) &&
20
+ HASH3=$(ipfs add --pin=false - q file3) &&
21
+ HASH4=$(ipfs add --pin=false - q file4)
22
22
'
23
23
24
24
test_expect_success " make an ipld object in json" '
@@ -31,7 +31,7 @@ test_dag_cmd() {
31
31
'
32
32
33
33
test_expect_success " output looks correct" '
34
- EXPHASH="zdpuApvChR5xM7ttbQmpmtna7wcShHi4gPyxUcWbB7nh8K7cN "
34
+ EXPHASH="zdpuAzn7KZcQmKJvpEM1DgHXaybVj7mRP4ZMrkW94taYEuZHp "
35
35
test $EXPHASH = $IPLDHASH
36
36
'
37
37
@@ -47,6 +47,15 @@ test_dag_cmd() {
47
47
test_cmp file3 out3
48
48
'
49
49
50
+ test_expect_success " can pin cbor object" '
51
+ ipfs pin add $EXPHASH
52
+ '
53
+
54
+ test_expect_success " after gc, objects still acessible" '
55
+ ipfs repo gc > /dev/null &&
56
+ ipfs refs -r --timeout=2s $EXPHASH > /dev/null
57
+ '
58
+
50
59
test_expect_success " add a normal file" '
51
60
HASH=$(echo "foobar" | ipfs add -q)
52
61
'
You can’t perform that action at this time.
0 commit comments