@cryptotaxi247 / kubo / commits / ee6c95c22

test listing a sharded directory with a missing block.

License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>

Steven Allen committed Mar 27, 2018 at 15:38 UTC ee6c95c22e79507a71a6062965deddf4601e2c6b
1 file changed +12
test/sharness/t0260-sharding.sh
+12
@@ -65,6 +65,18 @@ test_expect_success "ipfs cat error output the same" '
65 test_cmp sharded_err unsharded_err
66 '
67
68 +test_expect_success "'ipfs ls --resolve-type=false' admits missing block" '
69 + ipfs ls "$SHARDED" | head -1 > first_file &&
70 + read -r HASH _ NAME <first_file &&
71 + ipfs pin rm "$SHARDED" "$UNSHARDED" && # To allow us to remove the block
72 + ipfs block rm "$HASH" &&
73 + test_expect_code 1 ipfs cat "$SHARDED/$NAME" &&
74 + test_expect_code 1 ipfs ls "$SHARDED" &&
75 + ipfs ls --resolve-type=false "$SHARDED" | sort > missing_out &&
76 + test_cmp sharded_out missing_out
77 +'
78 +
79 +
80 test_add_large_dir_v1() {
81 exphash="$1"
82 test_expect_success "ipfs add (CIDv1) on very large directory succeeds" '