mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-27 16:07:42 +08:00
test listing a sharded directory with a missing block.
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
@ -65,6 +65,18 @@ test_expect_success "ipfs cat error output the same" '
|
|||||||
test_cmp sharded_err unsharded_err
|
test_cmp sharded_err unsharded_err
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success "'ipfs ls --resolve-type=false' admits missing block" '
|
||||||
|
ipfs ls "$SHARDED" | head -1 > first_file &&
|
||||||
|
read -r HASH _ NAME <first_file &&
|
||||||
|
ipfs pin rm "$SHARDED" "$UNSHARDED" && # To allow us to remove the block
|
||||||
|
ipfs block rm "$HASH" &&
|
||||||
|
test_expect_code 1 ipfs cat "$SHARDED/$NAME" &&
|
||||||
|
test_expect_code 1 ipfs ls "$SHARDED" &&
|
||||||
|
ipfs ls --resolve-type=false "$SHARDED" | sort > missing_out &&
|
||||||
|
test_cmp sharded_out missing_out
|
||||||
|
'
|
||||||
|
|
||||||
|
|
||||||
test_add_large_dir_v1() {
|
test_add_large_dir_v1() {
|
||||||
exphash="$1"
|
exphash="$1"
|
||||||
test_expect_success "ipfs add (CIDv1) on very large directory succeeds" '
|
test_expect_success "ipfs add (CIDv1) on very large directory succeeds" '
|
||||||
|
Reference in New Issue
Block a user