diff options
Diffstat (limited to 'testing')
| -rw-r--r-- | testing/data/.gitignore | 2 | ||||
| -rwxr-xr-x | testing/start-saio.sh | 7 | ||||
| -rwxr-xr-x | testing/with-saio.sh | 13 |
3 files changed, 22 insertions, 0 deletions
diff --git a/testing/data/.gitignore b/testing/data/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/testing/data/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/testing/start-saio.sh b/testing/start-saio.sh new file mode 100755 index 0000000..81cf845 --- /dev/null +++ b/testing/start-saio.sh @@ -0,0 +1,7 @@ +#!/bin/sh +if docker inspect schwift-testing &>/dev/null; then + echo 'Already running.' +else + # The `readlink -f` converts the path to repo/testing/data to an absolute path. + exec docker run --name schwift-testing -P -v "$(readlink -f "$(dirname $0)")/data:/swift/nodes" -t bouncestorage/swift-aio +fi diff --git a/testing/with-saio.sh b/testing/with-saio.sh new file mode 100755 index 0000000..9f040eb --- /dev/null +++ b/testing/with-saio.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if ! docker inspect schwift-testing >/dev/null; then + echo "SAIO container not running yet. Run ./testing/start-saio.sh to start it." >&2 + exit 1 +fi + +ST_PORT="$(docker inspect schwift-testing | jq -r '.[0].NetworkSettings.Ports["8080/tcp"][0].HostPort')" +export ST_AUTH="http://127.0.0.1:${ST_PORT}/auth/v1.0" +export ST_USER="test:tester" # hardcoded auth parameters in the bouncestorage/docker-swift image +export ST_KEY="testing" + +exec "$@" |
