1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 08:47:42 +08:00

sharness tests for --only-hash

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy
2015-06-23 09:04:31 -07:00
parent e42c967297
commit 60ad7a5afc
2 changed files with 22 additions and 0 deletions

View File

@ -39,6 +39,14 @@ test_expect_success "ipfs add output looks good" '
test_cmp expected actual
'
test_expect_success "ipfs add --only-hash succeeds" '
ipfs add --only-hash mountdir/hello.txt > oh_actual
'
test_expect_success "ipfs add --only-hash output looks good" '
ipfs add --only-hash mountdir/hello.txt > oh_actual
'
test_expect_success "ipfs cat succeeds" '
ipfs cat "$HASH" >actual
'

View File

@ -15,6 +15,20 @@ test_expect_success "ipfs add file succeeds" '
HASH=$(ipfs add -q afile)
'
test_expect_success "ipfs add output looks good" '
echo Qmb1EXrDyKhNWfvLPYK4do3M9nU7BuLAcbqBir6aUrDsRY > expected &&
echo $HASH > actual &&
test_cmp expected actual
'
test_expect_success "ipfs add --only-hash succeeds" '
ipfs add -q --only-hash afile > ho_output
'
test_expect_success "ipfs add --only-hash output looks good" '
test_cmp expected ho_output
'
test_expect_success "ipfs cat file suceeds" '
ipfs cat $HASH > out_1
'