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:
@ -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
|
||||
'
|
||||
|
@ -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
|
||||
'
|
||||
|
Reference in New Issue
Block a user