storj/scripts/test-sdk.sh

29 lines
759 B
Bash
Raw Normal View History

2019-01-08 15:24:15 +00:00
#!/bin/bash
set -ueo pipefail
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
2019-01-16 18:50:16 +00:00
make -C $SCRIPTDIR/.. install-sdk
2019-01-08 15:24:15 +00:00
# setup tmpdir for testfiles and cleanup
TMP=$(mktemp -d -t tmp.XXXXXXXXXX)
cleanup(){
rm -rf "$TMP"
}
trap cleanup EXIT
export STORJ_LOCAL_NETWORK=$TMP
# setup the network
storj-sdk -x network setup
# run aws-cli tests
2019-01-16 18:50:16 +00:00
storj-sdk -x network test bash $SCRIPTDIR/test-sdk-aws.sh
2019-01-08 15:24:15 +00:00
storj-sdk -x network destroy
# ipv6 tests disabled because aws-cli doesn't seem to support connecting to ipv6 host
# # setup the network with ipv6
# storj-sdk -x --host "::1" network setup
# # run aws-cli tests using ipv6
# storj-sdk -x --host "::1" network test bash $SCRIPTDIR/test-storj-sdk-aws.sh
# storj-sdk -x network destroy