Uses preset API_MADDR and GWAY_ADDR globals.
License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
Stephen Whitmore committed
Feb 23, 2016 at 11:53 UTC
2f64de0d61f4c3afc56f6b7ca4de0b115ac44a10
1 file changed
+5
-6
test/sharness/t0060-daemon.sh
+5
-6
@@ -12,9 +12,6 @@ gwyport=8082
12
apiport=5002
13
swarmport=4003
14
15
-API_MADDR="/ip4/0.0.0.0/tcp/$apiport"
16
-GATEWAY_MADDR="/ip4/0.0.0.0/tcp/$gwyport"
17
-
15
# TODO: randomize ports here once we add --config to ipfs daemon
16
17
# this needs to be in a different test than "ipfs daemon" below
@@ -23,10 +20,12 @@ test_expect_success "setup IPFS_PATH" '
20
export IPFS_PATH
21
'
22
23
+api_maddr="/ip4/0.0.0.0/tcp/$apiport"
24
+gway_maddr="/ip4/0.0.0.0/tcp/$gwyport"
25
test_expect_success 'ipfs init & config' '
26
ipfs init &&
28
- ipfs config Addresses.Gateway $GATEWAY_MADDR &&
29
- ipfs config Addresses.API $API_MADDR &&
27
+ ipfs config Addresses.Gateway $gway_maddr &&
28
+ ipfs config Addresses.API $api_maddr &&
29
ipfs config --json=true Addresses.Swarm "[\"/ip4/0.0.0.0/tcp/4003\"]"
30
'
31
@@ -60,7 +59,7 @@ test_expect_success "ipfs daemon output looks good" '
59
echo "Initializing daemon..." >expected_daemon &&
60
sed "s/^/Swarm listening on /" local_addrs >>expected_daemon &&
61
echo "API server listening on '$API_MADDR'" >>expected_daemon &&
63
- echo "Gateway (readonly) server listening on '$GATEWAY_MADDR'" >>expected_daemon &&
62
+ echo "Gateway (readonly) server listening on '$GWAY_MADDR'" >>expected_daemon &&
63
echo "Daemon is ready" >>expected_daemon &&
64
test_cmp expected_daemon actual_daemon
65
'