2019-01-08 15:24:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -ueo pipefail
|
2019-02-06 12:47:00 +00:00
|
|
|
set +x
|
2019-01-08 15:24:15 +00:00
|
|
|
|
|
|
|
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
|
2019-03-20 14:58:07 +00:00
|
|
|
make -C "$SCRIPTDIR"/.. install-sim
|
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
|
|
|
|
|
2019-02-06 12:47:00 +00:00
|
|
|
export STORJ_NETWORK_DIR=$TMP
|
2019-01-08 15:24:15 +00:00
|
|
|
|
|
|
|
# setup the network
|
2019-01-16 23:09:57 +00:00
|
|
|
storj-sim -x network setup
|
2019-01-08 15:24:15 +00:00
|
|
|
|
|
|
|
# run aws-cli tests
|
2019-03-20 14:58:07 +00:00
|
|
|
storj-sim -x network test bash "$SCRIPTDIR"/test-sim-aws.sh
|
|
|
|
storj-sim -x network test bash "$SCRIPTDIR"/test-uplink.sh
|
2019-01-16 23:09:57 +00:00
|
|
|
storj-sim -x network destroy
|
2019-01-08 15:24:15 +00:00
|
|
|
|
2019-02-06 12:47:00 +00:00
|
|
|
# setup the network with ipv6
|
|
|
|
storj-sim -x --host "::1" network setup
|
|
|
|
# aws-cli doesn't support gateway with ipv6 address, so change it to use localhost
|
2019-03-20 14:58:07 +00:00
|
|
|
find "$STORJ_NETWORK_DIR"/gateway -type f -name config.yaml -exec sed -i 's/server.address: "\[::1\]/server.address: "127.0.0.1/' '{}' +
|
2019-02-06 12:47:00 +00:00
|
|
|
# run aws-cli tests using ipv6
|
2019-03-20 14:58:07 +00:00
|
|
|
storj-sim -x --host "::1" network test bash "$SCRIPTDIR"/test-sim-aws.sh
|
|
|
|
storj-sim -x network destroy
|