mirror of https://github.com/docker/docs.git
Merge pull request #708 from aluzzardi/integration-dont-build
integration tests: Don't build binaries anymore, it's too slow.
This commit is contained in:
commit
d41e7c89b2
|
@ -4,7 +4,7 @@
|
||||||
SWARM_ROOT=${SWARM_ROOT:-${BATS_TEST_DIRNAME}/../..}
|
SWARM_ROOT=${SWARM_ROOT:-${BATS_TEST_DIRNAME}/../..}
|
||||||
|
|
||||||
# Path of the Swarm binary.
|
# Path of the Swarm binary.
|
||||||
SWARM_BINARY=`mktemp`
|
SWARM_BINARY=${SWARM_BINARY:-${SWARM_ROOT}/swarm}
|
||||||
|
|
||||||
# Docker image and version to use for integration tests.
|
# Docker image and version to use for integration tests.
|
||||||
DOCKER_IMAGE=${DOCKER_IMAGE:-dockerswarm/dind}
|
DOCKER_IMAGE=${DOCKER_IMAGE:-dockerswarm/dind}
|
||||||
|
@ -27,16 +27,10 @@ function join() {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build the Swarm binary (if not already built)
|
|
||||||
function build_swarm() {
|
|
||||||
[ -x $SWARM_BINARY ] || (rm -f $SWARM_BINARY && cd $SWARM_ROOT && godep go build -o $SWARM_BINARY)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Run the swarm binary. You must NOT fork this command (swarm foo &) as the PID
|
# Run the swarm binary. You must NOT fork this command (swarm foo &) as the PID
|
||||||
# ($!) will be the one of the subshell instead of swarm and you won't be able
|
# ($!) will be the one of the subshell instead of swarm and you won't be able
|
||||||
# to kill it.
|
# to kill it.
|
||||||
function swarm() {
|
function swarm() {
|
||||||
build_swarm
|
|
||||||
"$SWARM_BINARY" "$@"
|
"$SWARM_BINARY" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +61,6 @@ function wait_until_reachable() {
|
||||||
|
|
||||||
# Start the swarm manager in background.
|
# Start the swarm manager in background.
|
||||||
function swarm_manage() {
|
function swarm_manage() {
|
||||||
build_swarm
|
|
||||||
|
|
||||||
local discovery
|
local discovery
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
discovery=`join , ${HOSTS[@]}`
|
discovery=`join , ${HOSTS[@]}`
|
||||||
|
@ -83,8 +75,6 @@ function swarm_manage() {
|
||||||
|
|
||||||
# Start swarm join for every engine with the discovery as parameter
|
# Start swarm join for every engine with the discovery as parameter
|
||||||
function swarm_join() {
|
function swarm_join() {
|
||||||
build_swarm
|
|
||||||
|
|
||||||
local i=0
|
local i=0
|
||||||
for h in ${HOSTS[@]}; do
|
for h in ${HOSTS[@]}; do
|
||||||
echo "Swarm join #${i}: $h $@"
|
echo "Swarm join #${i}: $h $@"
|
||||||
|
|
Loading…
Reference in New Issue