File tree 1 file changed +14
-0
lines changed 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ get_field_num() {
237
237
test_expect_success " 'ipfs repo stat' succeeds" '
238
238
ipfs repo stat > repo-stats
239
239
'
240
+
240
241
test_expect_success " repo stats came out correct" '
241
242
grep "RepoPath" repo-stats &&
242
243
grep "RepoSize" repo-stats &&
@@ -245,6 +246,19 @@ test_expect_success "repo stats came out correct" '
245
246
grep "StorageMax" repo-stats
246
247
'
247
248
249
+ test_expect_success " 'ipfs repo stat --human' succeeds" '
250
+ ipfs repo stat --human > repo-stats-human
251
+ '
252
+
253
+ test_expect_success " repo stats --human came out correct" '
254
+ grep "RepoPath" repo-stats-human &&
255
+ grep -P "RepoSize:\s*([0-9]*[.])?[0-9]+\s+?(B|kB|MB|GB|TB|PB|EB)" repo-stats-human &&
256
+ grep "NumObjects" repo-stats-human &&
257
+ grep "Version" repo-stats-human &&
258
+ grep -P "StorageMax:\s*([0-9]*[.])?[0-9]+\s+?(B|kB|MB|GB|TB|PB|EB)" repo-stats-human ||
259
+ test_fsh cat repo-stats-human
260
+ '
261
+
248
262
test_expect_success " 'ipfs repo stat' after adding a file" '
249
263
ipfs add repo-stats &&
250
264
ipfs repo stat > repo-stats-2
You can’t perform that action at this time.
0 commit comments