t0062: check that 'ipfs config' works
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Christian Couder committed
Aug 29, 2015 at 22:28 UTC
cbeff099a2d55073af6c02779376671e57e4e859
1 file changed
+6
-3
test/sharness/t0062-daemon-api.sh
+6
-3
@@ -12,11 +12,14 @@ test_init_ipfs
12
differentport=$((PORT_API + 1))
13
api_different="/ip4/127.0.0.1/tcp/$differentport"
14
api_unreachable="/ip4/127.0.0.1/tcp/1"
15
-api_fromcfg=$(ipfs config Addresses.API)
16
-peerid=$(ipfs config Identity.PeerID)
15
+
16
+test_expect_success "config setup" '
17
+ api_fromcfg=$(ipfs config Addresses.API) &&
18
+ peerid=$(ipfs config Identity.PeerID)
19
+'
20
21
test_client() {
19
- printf $peerid >expected
22
+ printf "$peerid" >expected
23
ipfs "$@" id -f="<id>" >actual
24
test_cmp expected actual
25
}