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

sharness: add trickle and chunker test

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
rht
2015-10-03 09:03:09 +07:00
parent 220b9d22ae
commit 32d9bd76f3

View File

@ -48,6 +48,26 @@ test_add_cat_file() {
test_expect_success "output looks good" ' test_expect_success "output looks good" '
test_cmp expected actual test_cmp expected actual
' '
test_expect_success "ipfs add -t succeeds" '
ipfs add -t mountdir/hello.txt >actual
'
test_expect_success "ipfs add -t output looks good" '
HASH="QmUkUQgxXeggyaD5Ckv8ZqfW8wHBX6cYyeiyqvVZYzq5Bi" &&
echo "added $HASH hello.txt" >expected &&
test_cmp expected actual
'
test_expect_success "ipfs add --chunker size-32 succeeds" '
ipfs add --chunker rabin mountdir/hello.txt >actual
'
test_expect_success "ipfs add --chunker size-32 output looks good" '
HASH="QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH" &&
echo "added $HASH hello.txt" >expected &&
test_cmp expected actual
'
} }
test_add_cat_5MB() { test_add_cat_5MB() {
@ -179,6 +199,7 @@ test_expect_success "ipfs cat succeeds with stdin opened (issue #1141)" '
' '
test_expect_success "ipfs cat output looks good" ' test_expect_success "ipfs cat output looks good" '
cat mountdir/hello.txt >expected &&
test_cmp expected actual test_cmp expected actual
' '