mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 01:12:24 +08:00
cleanup name publish argument tests
1. Don't bother testing the peer IDs. These commands won't ever use them. 2. Move the `--help` test out from in-between the missing argument tests. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
@ -94,21 +94,17 @@ test_expect_success "publish an explicit node ID as key name looks good" '
|
|||||||
# test publishing nothing
|
# test publishing nothing
|
||||||
|
|
||||||
test_expect_success "'ipfs name publish' fails" '
|
test_expect_success "'ipfs name publish' fails" '
|
||||||
PEERID=`ipfs id --format="<id>"` &&
|
|
||||||
test_check_peerid "${PEERID}" &&
|
|
||||||
printf '' | test_expect_code 1 ipfs name publish >publish_out 2>&1
|
printf '' | test_expect_code 1 ipfs name publish >publish_out 2>&1
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "'ipfs name publish --help' succeeds" '
|
|
||||||
PEERID=`ipfs id --format="<id>"` &&
|
|
||||||
test_check_peerid "${PEERID}" &&
|
|
||||||
ipfs name publish --help
|
|
||||||
'
|
|
||||||
|
|
||||||
test_expect_success "publish output has the correct error" '
|
test_expect_success "publish output has the correct error" '
|
||||||
grep "argument \"ipfs-path\" is required" publish_out
|
grep "argument \"ipfs-path\" is required" publish_out
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success "'ipfs name publish --help' succeeds" '
|
||||||
|
ipfs name publish --help
|
||||||
|
'
|
||||||
|
|
||||||
test_launch_ipfs_daemon
|
test_launch_ipfs_daemon
|
||||||
|
|
||||||
test_expect_success "empty request to name publish doesn't panic and returns error" '
|
test_expect_success "empty request to name publish doesn't panic and returns error" '
|
||||||
|
Reference in New Issue
Block a user