mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 19:24:14 +08:00
Merge pull request #3751 from ipfs/feat/sharness/small-clean-p1
test: small cleanup of t0010
This commit is contained in:
@ -17,8 +17,7 @@ test_expect_success "ipfs version succeeds" '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "ipfs --version success" '
|
test_expect_success "ipfs --version success" '
|
||||||
ipfs --version ||
|
ipfs --version
|
||||||
test_fsh ipfs --version
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "ipfs version output looks good" '
|
test_expect_success "ipfs version output looks good" '
|
||||||
@ -65,9 +64,26 @@ test_expect_success "'ipfs commands' output looks good" '
|
|||||||
test_expect_success "All commands accept --help" '
|
test_expect_success "All commands accept --help" '
|
||||||
while read -r cmd
|
while read -r cmd
|
||||||
do
|
do
|
||||||
echo "running: $cmd --help"
|
$cmd --help </dev/null >/dev/null ||
|
||||||
$cmd --help </dev/null >/dev/null || return
|
{ echo $cmd doesnt accept --help; FAIL=1; }
|
||||||
done <commands.txt
|
done <commands.txt
|
||||||
|
|
||||||
|
if [ ${FAIL-0} = 1 ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_failure "All ipfs root commands are mentioned in base helptext" '
|
||||||
|
cut -d" " -f 2 commands.txt | sort -u | \
|
||||||
|
while read cmd
|
||||||
|
do
|
||||||
|
grep " $cmd" help.txt > /dev/null ||
|
||||||
|
{ echo missing $cmd from helptext; FAIL=1; }
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ${FAIL-0} = 1 ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "'ipfs commands --flags' succeeds" '
|
test_expect_success "'ipfs commands --flags' succeeds" '
|
||||||
@ -80,4 +96,6 @@ test_expect_success "'ipfs commands --flags' output looks good" '
|
|||||||
grep "ipfs repo gc --quiet / ipfs repo gc -q" commands.txt
|
grep "ipfs repo gc --quiet / ipfs repo gc -q" commands.txt
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Reference in New Issue
Block a user