Add test for buzhash
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
Jakub Sztandera committed
Oct 7, 2019 at 18:17 UTC
6f4f9b4cbba6c752e416bfe433de8063385900b3
1 file changed
+10
test/sharness/t0040-add-and-cat.sh
+10
@@ -193,6 +193,16 @@ test_add_cat_file() {
193
test_expect_code 1 ipfs add -Q --chunker rabin-12-512-1024 mountdir/hello.txt
194
'
195
196
+ test_expect_success "ipfs add --chunker buzhash suceeds" '
197
+ ipfs add --chunker buzhash mountdir/hello.txt >actual
198
+ '
199
+
200
+ test_expect_success "ipfs add --chunker buzhahs output looks good" '
201
+ HASH="QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH" &&
202
+ echo "added $HASH hello.txt" >expected &&
203
+ test_cmp expected actual
204
+ '
205
+
206
test_expect_success "ipfs add on hidden file succeeds" '
207
echo "Hello Worlds!" >mountdir/.hello.txt &&
208
ipfs add mountdir/.hello.txt >actual