Unverified 提交 a410f7e2 作者: Steven Allen 提交者: GitHub

Merge pull request #6116 from reinerRubin/test/cmds/6110-repo-stat-human-flag

command repo stat: add human flag tests to t0080-repo.sh
......@@ -237,6 +237,7 @@ get_field_num() {
test_expect_success "'ipfs repo stat' succeeds" '
ipfs repo stat > repo-stats
'
test_expect_success "repo stats came out correct" '
grep "RepoPath" repo-stats &&
grep "RepoSize" repo-stats &&
......@@ -245,6 +246,19 @@ test_expect_success "repo stats came out correct" '
grep "StorageMax" repo-stats
'
test_expect_success "'ipfs repo stat --human' succeeds" '
ipfs repo stat --human > repo-stats-human
'
test_expect_success "repo stats --human came out correct" '
grep "RepoPath" repo-stats-human &&
grep -P "RepoSize:\s*([0-9]*[.])?[0-9]+\s+?(B|kB|MB|GB|TB|PB|EB)" repo-stats-human &&
grep "NumObjects" repo-stats-human &&
grep "Version" repo-stats-human &&
grep -P "StorageMax:\s*([0-9]*[.])?[0-9]+\s+?(B|kB|MB|GB|TB|PB|EB)" repo-stats-human ||
test_fsh cat repo-stats-human
'
test_expect_success "'ipfs repo stat' after adding a file" '
ipfs add repo-stats &&
ipfs repo stat > repo-stats-2
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论