Skip to content

Commit

Permalink
test pin update
Browse files Browse the repository at this point in the history
tests #4999 and #5264

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
  • Loading branch information
Stebalien committed Jul 20, 2018
1 parent f8155d7 commit b9989f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/sharness/t0085-pins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ test_pins() {
test_expect_success "unpin those hashes" '
cat hashes | ipfs pin rm
'

test_expect_success "test pin update" '
ipfs pin add "$HASH_A" &&
ipfs pin ls > before_update &&
test_should_contain "$HASH_A" before_update &&
test_must_fail grep -q "$HASH_B" before_update &&
ipfs pin update --unpin=true "$HASH_A" "$HASH_B" &&
ipfs pin ls > after_update &&
test_must_fail grep -q "$HASH_A" after_update &&
test_should_contain "$HASH_B" after_update &&
ipfs pin rm "$HASH_B"
'
}

RANDOM_HASH=Qme8uX5n9hn15pw9p6WcVKoziyyC9LXv4LEgvsmKMULjnV
Expand Down

0 comments on commit b9989f8

Please sign in to comment.