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:
Andrea Luzzardi 2015-05-04 14:52:01 -07:00
commit d41e7c89b2
1 changed files with 1 additions and 11 deletions

View File

@ -4,7 +4,7 @@
SWARM_ROOT=${SWARM_ROOT:-${BATS_TEST_DIRNAME}/../..}
# 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=${DOCKER_IMAGE:-dockerswarm/dind}
@ -27,16 +27,10 @@ function join() {
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
# ($!) will be the one of the subshell instead of swarm and you won't be able
# to kill it.
function swarm() {
build_swarm
"$SWARM_BINARY" "$@"
}
@ -67,8 +61,6 @@ function wait_until_reachable() {
# Start the swarm manager in background.
function swarm_manage() {
build_swarm
local discovery
if [ $# -eq 0 ]; then
discovery=`join , ${HOSTS[@]}`
@ -83,8 +75,6 @@ function swarm_manage() {
# Start swarm join for every engine with the discovery as parameter
function swarm_join() {
build_swarm
local i=0
for h in ${HOSTS[@]}; do
echo "Swarm join #${i}: $h $@"