Files
weave-scope/integration/config.sh
Paul Bellamy ff9771f112 initial integration test setup
Integration tests are only run on circle. They checkout the weave
project, and use test helpers from there.

There are just a few basic tests for now, to confirm it works.
2015-06-29 15:40:40 +01:00

26 lines
598 B
Bash

# NB only to be sourced
set -e
# these ought to match what is in Vagrantfile
# exported to override weave config.sh
export SSH_DIR="$PWD"
export HOSTS
WEAVE_REPO="github.com/weaveworks/weave"
WEAVE_ROOT="${GOPATH%%:*}/src/$WEAVE_REPO"
if [ ! -d "$WEAVE_ROOT" ] ; then
mkdir -p "$(dirname "$WEAVE_ROOT")"
git clone --depth 1 -b master https://$WEAVE_REPO.git "$WEAVE_ROOT"
go get $WEAVE_REPO/...
fi
. "$WEAVE_ROOT/test/config.sh"
scope_on() {
host=$1
shift 1
[ -z "$DEBUG" ] || greyly echo "Scope on $host: $@" >&2
run_on $host "DOCKER_HOST=tcp://$host:$DOCKER_PORT" scope "$@"
}