mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-24 11:15:43 +08:00
t0060: simplify peerid check
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This commit is contained in:
@ -33,20 +33,15 @@ test_expect_success "initialization ended" '
|
|||||||
|
|
||||||
# this errors if daemon didnt --init $IPFS_PATH correctly
|
# this errors if daemon didnt --init $IPFS_PATH correctly
|
||||||
test_expect_success "'ipfs config Identity.PeerID' works" '
|
test_expect_success "'ipfs config Identity.PeerID' works" '
|
||||||
ipfs config Identity.PeerID >config_peerId
|
PEERID=$(ipfs config Identity.PeerID)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "'ipfs swarm addrs local' works" '
|
test_expect_success "'ipfs swarm addrs local' works" '
|
||||||
ipfs swarm addrs local >local_addrs
|
ipfs swarm addrs local >local_addrs
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
||||||
# this is lifted straight from t0020-init.sh
|
|
||||||
test_expect_success "ipfs peer id looks good" '
|
test_expect_success "ipfs peer id looks good" '
|
||||||
PEERID=$(cat config_peerId) &&
|
test_check_peerid "$PEERID"
|
||||||
echo $PEERID | tr -dC "[:alnum:]" | wc -c | tr -d " " >actual_id &&
|
|
||||||
echo "46" >expected_id &&
|
|
||||||
test_cmp_repeat_10_sec expected_id actual_id
|
|
||||||
'
|
'
|
||||||
|
|
||||||
# This is like t0020-init.sh "ipfs init output looks good"
|
# This is like t0020-init.sh "ipfs init output looks good"
|
||||||
|
Reference in New Issue
Block a user