Shard 600_proxy_docker_py into 4.

This commit is contained in:
Tom Wilkie committed 2015-07-30 10:38:02 +00:00
1 parent bfe07fc71a
commit 5c9a13d343
6 files changed
+69 -22

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
#! /bin/bash
# Explicitly not called _test.sh - this isn't run, but imported by other tests.
. ./config.sh
docker_py_test() {
SHARD=$1
TOTAL_SHARDS=$2
start_suite "Run docker-py test suite against the proxy"
# Get a list of the tests for use to shard
docker_on $HOST1 pull joffrey/docker-py >/dev/null
C=$(docker_on $HOST1 create \
-e NOT_ON_HOST=true \
-e DOCKER_HOST=tcp://172.17.42.1:12375 \
-v /tmp:/tmp \
-v /var/run/docker.sock:/var/run/docker.sock \
joffrey/docker-py)
docker cp $C:/home/docker-py/tests/integration_test.py .
CANDIDATES=$(sed -En 's/^class (Test[[:alpha:]]+).*/\1/p' integration_test.py)
TESTS=
for test in $CANDIDATES; do
if [ $(($i % $TOTAL_SHARDS)) -eq $SHARD ]; then
TESTS="$TESTS $test"
fi
i=$(($i + 1))
done
weave_on $HOST1 launch-proxy --no-default-ipalloc
if docker_on $HOST1 run \
-e NOT_ON_HOST=true \
-e DOCKER_HOST=tcp://172.17.42.1:12375 \
-v /tmp:/tmp \
-v /var/run/docker.sock:/var/run/docker.sock \
joffrey/docker-py python tests/integration_test.py "$TESTS" ; then
assert_raises "true"
else
assert_raises "false"
fi
end_suite
}
-22
View File
@@ -1,22 +0,0 @@
#! /bin/bash
. ./config.sh
start_suite "Run docker-py test suite against the proxy"
docker_on $HOST1 pull joffrey/docker-py >/dev/null
weave_on $HOST1 launch-proxy --no-default-ipalloc
if docker_on $HOST1 run \
-e NOT_ON_HOST=true \
-e DOCKER_HOST=tcp://172.17.42.1:12375 \
-v /tmp:/tmp \
-v /var/run/docker.sock:/var/run/docker.sock \
joffrey/docker-py python tests/integration_test.py ; then
assert_raises "true"
else
assert_raises "false"
fi
end_suite
+6
View File
@@ -0,0 +1,6 @@
#! /bin/bash
# Explicitly not called _test.sh - this isn't run, but imported by other tests.
. ./600_proxy_docker_py.sh
docker_py_test 0 4
+6
View File
@@ -0,0 +1,6 @@
#! /bin/bash
# Explicitly not called _test.sh - this isn't run, but imported by other tests.
. ./600_proxy_docker_py.sh
docker_py_test 1 4
+6
View File
@@ -0,0 +1,6 @@
#! /bin/bash
# Explicitly not called _test.sh - this isn't run, but imported by other tests.
. ./600_proxy_docker_py.sh
docker_py_test 2 4
+6
View File
@@ -0,0 +1,6 @@
#! /bin/bash
# Explicitly not called _test.sh - this isn't run, but imported by other tests.
. ./600_proxy_docker_py.sh
docker_py_test 3 4