test pin update
tests #4999 and #5264 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Steven Allen committed
Jul 19, 2018 at 18:14 UTC
e51588ee77c1ec9933e11e4c50980ebbd5fca5b5
1 file changed
+12
test/sharness/t0085-pins.sh
+12
@@ -48,6 +48,18 @@ test_pins() {
48
test_expect_success "unpin those hashes" '
49
cat hashes | ipfs pin rm
50
'
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
+ '
63
}
64
65
RANDOM_HASH=Qme8uX5n9hn15pw9p6WcVKoziyyC9LXv4LEgvsmKMULjnV