Skip to content

Commit dee54b3

Browse files
committed
add test about issue #4978
License: MIT Signed-off-by: Kejie Zhang <[email protected]>
1 parent 3dc0ce7 commit dee54b3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/sharness/t0600-issues-and-regressions-online.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,29 @@ test_expect_success "ipfs daemon --offline --mount fails - #2995" '
5959
test_fsh cat daemon_err
6060
'
6161

62+
test_launch_ipfs_daemon --offline
63+
64+
test_expect_success "'ipfs name resolve' succeeds after ipfs id when daemon offline" '
65+
PEERID=`ipfs id --format="<id>"` &&
66+
test_check_peerid "${PEERID}" &&
67+
ipfs name publish --allow-offline -Q "/ipfs/$HASH_WELCOME_DOCS" >publish_out
68+
'
69+
70+
test_expect_success "pubrmlish --quieter output looks good" '
71+
echo "${PEERID}" >expected1 &&
72+
test_cmp expected1 publish_out
73+
'
74+
75+
test_expect_success "'ipfs name resolve' succeeds" '
76+
ipfs name resolve "$PEERID" >output
77+
'
78+
79+
test_expect_success "resolve output looks good" '
80+
printf "/ipfs/%s\n" "$HASH_WELCOME_DOCS" >expected2 &&
81+
test_cmp expected2 output
82+
'
83+
84+
test_kill_ipfs_daemon
85+
6286
test_done
6387

0 commit comments

Comments
 (0)