mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-03 15:27:57 +08:00
add test check for pinning cbor objects
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
This commit is contained in:
parent
29c530ac0e
commit
8c3f78055e
@ -15,10 +15,10 @@ test_expect_success "make a few test files" '
|
||||
echo "bar" > file2 &&
|
||||
echo "baz" > file3 &&
|
||||
echo "qux" > file4 &&
|
||||
HASH1=$(ipfs add -q file1) &&
|
||||
HASH2=$(ipfs add -q file2) &&
|
||||
HASH3=$(ipfs add -q file3) &&
|
||||
HASH4=$(ipfs add -q file4)
|
||||
HASH1=$(ipfs add --pin=false -q file1) &&
|
||||
HASH2=$(ipfs add --pin=false -q file2) &&
|
||||
HASH3=$(ipfs add --pin=false -q file3) &&
|
||||
HASH4=$(ipfs add --pin=false -q file4)
|
||||
'
|
||||
|
||||
test_expect_success "make an ipld object in json" '
|
||||
@ -47,6 +47,15 @@ test_dag_cmd() {
|
||||
test_cmp file3 out3
|
||||
'
|
||||
|
||||
test_expect_success "can pin cbor object" '
|
||||
ipfs pin add $EXPHASH
|
||||
'
|
||||
|
||||
test_expect_success "after gc, objects still acessible" '
|
||||
ipfs repo gc > /dev/null &&
|
||||
ipfs refs -r --timeout=2s $EXPHASH > /dev/null
|
||||
'
|
||||
|
||||
test_expect_success "add a normal file" '
|
||||
HASH=$(echo "foobar" | ipfs add -q)
|
||||
'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user