Skip to content

Commit 53dee3c

Browse files
committedJun 25, 2015
add test for only-hash to ensure no blocks are added to datastore
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
1 parent aefdb4e commit 53dee3c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎test/sharness/t0041-add-cat-offline.sh

+8
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@ test_expect_success "output looks good" '
4545
test_cmp afile out_2
4646
'
4747

48+
test_expect_success "ipfs add --only-hash succeeds" '
49+
echo "unknown content for only-hash" | ipfs add --only-hash -q > oh_hash
50+
'
51+
52+
test_expect_success "ipfs cat file fails" '
53+
test_must_fail ipfs cat $(cat oh_hash)
54+
'
55+
4856
test_done

0 commit comments

Comments
 (0)
Please sign in to comment.