Commit e1d8200f authored by Christian Couder's avatar Christian Couder

test-lib: use all the test_launch_ipfs_daemon() arguments

It is simpler and less error prone to just pass to `ipfs daemon`
all the arguments that are passed to test_launch_ipfs_daemon().

Maybe the arguments should be shell quoted too, but that's
another issue.

License: MIT
Signed-off-by: default avatarChristian Couder <chriscool@tuxfamily.org>
parent dd265b7f
......@@ -193,7 +193,7 @@ test_config_ipfs_gateway_writable() {
test_launch_ipfs_daemon() {
args=$1
args="$@"
test_expect_success "'ipfs daemon' succeeds" '
ipfs daemon $args >actual_daemon 2>daemon_err &
......
......@@ -11,7 +11,7 @@ test_description="Test daemon command"
test_init_ipfs
test_launch_ipfs_daemon '--unrestricted-api --disable-transport-encryption'
test_launch_ipfs_daemon --unrestricted-api --disable-transport-encryption
gwyport=$PORT_GWAY
apiport=$PORT_API
......
......@@ -39,20 +39,7 @@ test_expect_success "client should err if client api != api file while daemon is
PORT_API=$differentport
ADDR_API=$differentapi
# test_launch_ipfs_daemon '--api "$ADDR_API"'
#pasted from test_launch_ipfs_daemon because the above line doesn't work
test_expect_success "'ipfs daemon' succeeds" '
ipfs daemon --api $ADDR_API >actual_daemon 2>daemon_err &
'
# we say the daemon is ready when the API server is ready.
test_expect_success "'ipfs daemon' is ready" '
IPFS_PID=$! &&
pollEndpoint -ep=/version -host=$ADDR_API -v -tout=1s -tries=60 2>poll_apierr > poll_apiout ||
test_fsh cat actual_daemon || test_fsh cat daemon_err || test_fsh cat poll_apierr || test_fsh cat poll_apiout
'
#end of "test_launch_ipfs_daemon
test_launch_ipfs_daemon --api "$ADDR_API"
test_expect_success "'ipfs daemon' api option works" '
printf "$differentapi" > expected &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment