Skip to content

Commit

Permalink
Sharness: add tests for ipfs repo stat --size-only
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
  • Loading branch information
hsanjuan committed Jun 4, 2018
1 parent 4d86d00 commit 3e5587e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/sharness/t0080-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,18 @@ test_expect_success "repo stats are updated correctly" '
test $(get_field_num "RepoSize" repo-stats-2) -ge $(get_field_num "RepoSize" repo-stats)
'

test_expect_success "'ipfs repo stat --size-only' succeeds" '
ipfs repo stat --size-only > repo-stats-size-only
'

test_expect_success "repo stats came out correct for --size-only" '
grep "RepoSize" repo-stats-size-only &&
grep "StorageMax" repo-stats-size-only &&
grep -v "RepoPath" repo-stats-size-only &&
grep -v "NumObjects" repo-stats-size-only &&
grep -v "Version" repo-stats-size-only
'

test_expect_success "'ipfs repo version' succeeds" '
ipfs repo version > repo-version
'
Expand Down

0 comments on commit 3e5587e

Please sign in to comment.