Shard 600_proxy_docker_py into 4.
This commit is contained in:
1 parent
bfe07fc71a
commit
5c9a13d343
6 files changed
+69
-22
No files matched your search
Executable
+45
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
Executable
+6
@@ -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
|
||||
Executable
+6
@@ -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
|
||||
Executable
+6
@@ -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
|
||||
Executable
+6
@@ -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
|
||||
Reference in new issue
Block a user