1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-20 19:19:06 +08:00

add test about issue #4978

License: MIT
Signed-off-by: Kejie Zhang <601172892@qq.com>
This commit is contained in:
Kejie Zhang
2018-10-04 22:29:27 +08:00
parent 3dc0ce7fa1
commit dee54b36d9

View File

@ -59,5 +59,29 @@ test_expect_success "ipfs daemon --offline --mount fails - #2995" '
test_fsh cat daemon_err
'
test_launch_ipfs_daemon --offline
test_expect_success "'ipfs name resolve' succeeds after ipfs id when daemon offline" '
PEERID=`ipfs id --format="<id>"` &&
test_check_peerid "${PEERID}" &&
ipfs name publish --allow-offline -Q "/ipfs/$HASH_WELCOME_DOCS" >publish_out
'
test_expect_success "pubrmlish --quieter output looks good" '
echo "${PEERID}" >expected1 &&
test_cmp expected1 publish_out
'
test_expect_success "'ipfs name resolve' succeeds" '
ipfs name resolve "$PEERID" >output
'
test_expect_success "resolve output looks good" '
printf "/ipfs/%s\n" "$HASH_WELCOME_DOCS" >expected2 &&
test_cmp expected2 output
'
test_kill_ipfs_daemon
test_done