Skip to content

Commit

Permalink
Add reversible gc test
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: rht <[email protected]>
  • Loading branch information
rht committed Jul 28, 2015
1 parent f417cb5 commit 5e21d17
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/sharness/t0080-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ test_expect_success "'ipfs pin rm' output looks good" '
test_cmp expected1 actual1
'

test_expect_failure "ipfs repo gc fully reverse ipfs add" '
random 100000 41 >gcfile &&
du -sb "$IPFS_PATH/blocks" | awk "{print \$1}" >expected &&
hash=`ipfs add -q gcfile` &&
ipfs pin rm -r $hash &&
ipfs repo gc &&
du -sb "$IPFS_PATH/blocks" | awk "{print \$1}" >actual &&
test_cmp expected actual
'

test_expect_success "file no longer pinned" '
# we expect the welcome files and gw assets to show up here
echo "$HASH_WELCOME_DOCS" >expected2 &&
Expand Down

0 comments on commit 5e21d17

Please sign in to comment.