add test for only-hash to ensure no blocks are added to datastore

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy 2015-06-25 09:33:47 -07:00
parent aefdb4e0e1
commit 53dee3c64d

View File

@ -45,4 +45,12 @@ test_expect_success "output looks good" '
test_cmp afile out_2
'
test_expect_success "ipfs add --only-hash succeeds" '
echo "unknown content for only-hash" | ipfs add --only-hash -q > oh_hash
'
test_expect_success "ipfs cat file fails" '
test_must_fail ipfs cat $(cat oh_hash)
'
test_done