@cryptotaxi247 / kubo / commits / dee54b36d

add test about issue #4978

License: MIT Signed-off-by: Kejie Zhang <601172892@qq.com>

Kejie Zhang committed Oct 4, 2018 at 22:29 UTC dee54b36d92a4e773cffa96385d572ff1f34cfab
1 file changed +24
test/sharness/t0600-issues-and-regressions-online.sh
+24
@@ -59,5 +59,29 @@ test_expect_success "ipfs daemon --offline --mount fails - #2995" '
59 test_fsh cat daemon_err
60 '
61
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 +
86 test_done
87