Sharness: add tests for ipfs repo stat --size-only
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
Hector Sanjuan committed
May 10, 2018 at 01:22 UTC
37d498964739cd84c025dd59cbc6decae71fb33c
1 file changed
+12
test/sharness/t0080-repo.sh
+12
@@ -245,6 +245,18 @@ test_expect_success "repo stats are updated correctly" '
245
test $(get_field_num "RepoSize" repo-stats-2) -ge $(get_field_num "RepoSize" repo-stats)
246
'
247
248
+test_expect_success "'ipfs repo stat --size-only' succeeds" '
249
+ ipfs repo stat --size-only > repo-stats-size-only
250
+'
251
+
252
+test_expect_success "repo stats came out correct for --size-only" '
253
+ grep "RepoSize" repo-stats-size-only &&
254
+ grep "StorageMax" repo-stats-size-only &&
255
+ grep -v "RepoPath" repo-stats-size-only &&
256
+ grep -v "NumObjects" repo-stats-size-only &&
257
+ grep -v "Version" repo-stats-size-only
258
+'
259
+
260
test_expect_success "'ipfs repo version' succeeds" '
261
ipfs repo version > repo-version
262
'