Commit 8c78d407 authored by Steven Allen's avatar Steven Allen

pinning: test pinning/unpinning files in sharded directories

License: MIT
Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
parent e2cd36e8
......@@ -72,6 +72,16 @@ test_sharding() {
test_cmp file_out file_exp
'
test_expect_success "can pin a file from sharded directory" '
ipfs files stat --hash /foo/file42 > pin_file_hash &&
ipfs pin add < pin_file_hash > pin_hash
'
test_expect_success "can unpin a file from sharded directory" '
read -r _ HASH _ < pin_hash &&
ipfs pin rm $HASH
'
test_expect_success "output object was really sharded" '
ipfs files stat --hash /foo > expected_foo_hash &&
echo QmPkwLJTYZRGPJ8Lazr9qPdrLmswPtUjaDbEpmR9jEh1se > actual_foo_hash &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment