@cryptotaxi247 / kubo / commits / 53dee3c64

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

License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>

Jeromy committed Jun 25, 2015 at 09:33 UTC 53dee3c64d099fe5eeac83577e4db9a6b703f0ad
1 file changed +8
test/sharness/t0041-add-cat-offline.sh
+8
@@ -45,4 +45,12 @@ test_expect_success "output looks good" '
45 test_cmp afile out_2
46 '
47
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 +
56 test_done