@cryptotaxi247 / kubo / commits / 32d9bd76f

sharness: add trickle and chunker test

License: MIT Signed-off-by: rht <rhtbot@gmail.com>

rht committed Oct 3, 2015 at 09:03 UTC 32d9bd76f3d4a356a244384757c8747e722f516a
1 file changed +21
test/sharness/t0040-add-and-cat.sh
+21
@@ -48,6 +48,26 @@ test_add_cat_file() {
48 test_expect_success "output looks good" '
49 test_cmp expected actual
50 '
51 +
52 + test_expect_success "ipfs add -t succeeds" '
53 + ipfs add -t mountdir/hello.txt >actual
54 + '
55 +
56 + test_expect_success "ipfs add -t output looks good" '
57 + HASH="QmUkUQgxXeggyaD5Ckv8ZqfW8wHBX6cYyeiyqvVZYzq5Bi" &&
58 + echo "added $HASH hello.txt" >expected &&
59 + test_cmp expected actual
60 + '
61 +
62 + test_expect_success "ipfs add --chunker size-32 succeeds" '
63 + ipfs add --chunker rabin mountdir/hello.txt >actual
64 + '
65 +
66 + test_expect_success "ipfs add --chunker size-32 output looks good" '
67 + HASH="QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH" &&
68 + echo "added $HASH hello.txt" >expected &&
69 + test_cmp expected actual
70 + '
71 }
72
73 test_add_cat_5MB() {
@@ -179,6 +199,7 @@ test_expect_success "ipfs cat succeeds with stdin opened (issue #1141)" '
199 '
200
201 test_expect_success "ipfs cat output looks good" '
202 + cat mountdir/hello.txt >expected &&
203 test_cmp expected actual
204 '
205