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>
Steven Allen committed
Mar 19, 2018 at 16:31 UTC
781dfa1252b51f4d807454d5791e299804a1d380
1 file changed
+4
-8
test/sharness/t0100-name.sh
+4
-8
@@ -94,21 +94,17 @@ test_expect_success "publish an explicit node ID as key name looks good" '
94
# test publishing nothing
95
96
test_expect_success "'ipfs name publish' fails" '
97
- PEERID=`ipfs id --format="<id>"` &&
98
- test_check_peerid "${PEERID}" &&
97
printf '' | test_expect_code 1 ipfs name publish >publish_out 2>&1
98
'
99
102
-test_expect_success "'ipfs name publish --help' succeeds" '
103
- PEERID=`ipfs id --format="<id>"` &&
104
- test_check_peerid "${PEERID}" &&
105
- ipfs name publish --help
106
-'
107
-
100
test_expect_success "publish output has the correct error" '
101
grep "argument \"ipfs-path\" is required" publish_out
102
'
103
104
+test_expect_success "'ipfs name publish --help' succeeds" '
105
+ ipfs name publish --help
106
+'
107
+
108
test_launch_ipfs_daemon
109
110
test_expect_success "empty request to name publish doesn't panic and returns error" '