@cryptotaxi247 / kubo / commits / 0aa59368e

t0060: simplify peerid check

License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

Christian Couder committed Sep 12, 2015 at 19:06 UTC 0aa59368e46ca60eb0cdb7ab7aab149459fc8454
1 file changed +2 -7
test/sharness/t0060-daemon.sh
+2 -7
@@ -33,20 +33,15 @@ test_expect_success "initialization ended" '
33
34 # this errors if daemon didnt --init $IPFS_PATH correctly
35 test_expect_success "'ipfs config Identity.PeerID' works" '
36 - ipfs config Identity.PeerID >config_peerId
36 + PEERID=$(ipfs config Identity.PeerID)
37 '
38
39 test_expect_success "'ipfs swarm addrs local' works" '
40 ipfs swarm addrs local >local_addrs
41 '
42
43 -
44 -# this is lifted straight from t0020-init.sh
43 test_expect_success "ipfs peer id looks good" '
46 - PEERID=$(cat config_peerId) &&
47 - echo $PEERID | tr -dC "[:alnum:]" | wc -c | tr -d " " >actual_id &&
48 - echo "46" >expected_id &&
49 - test_cmp_repeat_10_sec expected_id actual_id
44 + test_check_peerid "$PEERID"
45 '
46
47 # This is like t0020-init.sh "ipfs init output looks good"