@@ -30,10 +30,10 @@ test_expect_success "set up test data" '
30
30
done
31
31
'
32
32
# CID of big_dir/ which will be sharded.
33
- SHARDED=" QmUj4SSHNz27z9t6DtZJiR56r17BWqwMrWCzBcR6hF2bq1 "
33
+ SHARDED=" QmWfjnRWRvdvYezQWnfbvrvY7JjrpevsE9cato1x76UqGr "
34
34
# CID of big_dir/ once we remove half its entries and trigger a switch
35
35
# back to a basic directory (un-sharding).
36
- UNSHAREDED=" QmbvMyr8D2GDwuBkyJhbVWkrrVaJfFQhwUKFYqWnhkEiwg "
36
+ UNSHAREDED=" QmbVxi5zDdzytrjdufUejM92JsWj8wGVmukk6tiPce3p1m "
37
37
# CID of small_dir/ which will *not* be sharded.
38
38
NOT_SHARDED=" QmdBXmm4HRpUhyzzctbFvi2tLai3XFL1YjmE1qfpJe61NX"
39
39
@@ -64,15 +64,17 @@ test_add_dir_with_sharding_enabled "$NOT_SHARDED" small_dir
64
64
65
65
test_kill_ipfs_daemon
66
66
67
- test_expect_success " remove a few entries from big_dir/" '
68
- for i in `seq 5` # just to be sure
67
+ test_expect_success " remove a few entries from big_dir/ to trigger unsharding" '
68
+ ipfs files cp /ipfs/$SHARDED /big_dir &&
69
+ for i in `seq 5`
69
70
do
70
- rm big_dir/`printf "file%06d" $i`
71
- done
71
+ ipfs files rm /big_dir/`printf "file%06d" $i`
72
+ done &&
73
+ ipfs files stat --hash /big_dir > unshard_dir_hash &&
74
+ echo "$UNSHAREDED" > unshard_exp &&
75
+ test_cmp unshard_exp unshard_dir_hash"
72
76
'
73
77
74
- test_add_dir_with_sharding_enabled " $UNSHAREDED " big_dir
75
-
76
78
test_expect_success " ipfs cat error output the same" '
77
79
test_expect_code 1 ipfs cat "$SHARDED" 2> sharded_err &&
78
80
test_expect_code 1 ipfs cat "$NOT_SHARDED" 2> unsharded_err &&
0 commit comments