Skip to content

Commit b9989f8

Browse files
committed
test pin update
tests #4999 and #5264 License: MIT Signed-off-by: Steven Allen <[email protected]>
1 parent f8155d7 commit b9989f8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/sharness/t0085-pins.sh

+12
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ test_pins() {
4848
test_expect_success "unpin those hashes" '
4949
cat hashes | ipfs pin rm
5050
'
51+
52+
test_expect_success "test pin update" '
53+
ipfs pin add "$HASH_A" &&
54+
ipfs pin ls > before_update &&
55+
test_should_contain "$HASH_A" before_update &&
56+
test_must_fail grep -q "$HASH_B" before_update &&
57+
ipfs pin update --unpin=true "$HASH_A" "$HASH_B" &&
58+
ipfs pin ls > after_update &&
59+
test_must_fail grep -q "$HASH_A" after_update &&
60+
test_should_contain "$HASH_B" after_update &&
61+
ipfs pin rm "$HASH_B"
62+
'
5163
}
5264

5365
RANDOM_HASH=Qme8uX5n9hn15pw9p6WcVKoziyyC9LXv4LEgvsmKMULjnV

0 commit comments

Comments
 (0)