mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 10:11:03 +00:00
The integration tests were using two different versions of weave. One to launch the weave container, and another used by scope.
31 lines
733 B
Bash
31 lines
733 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:="$(go list -e -f {{.Dir}} $WEAVE_REPO)"}
|
|
|
|
RUNNER="$WEAVE_ROOT/testing/runner/runner"
|
|
[ -x "$RUNNER" ] || (echo "Could not find weave test runner at $RUNNER." >&2 ; exit 1)
|
|
|
|
. "$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 "$@"
|
|
}
|
|
|
|
weave_on() {
|
|
host=$1
|
|
shift 1
|
|
[ -z "$DEBUG" ] || greyly echo "Weave on $host: $@" >&2
|
|
run_on $host DOCKER_HOST=tcp://$host:$DOCKER_PORT weave "$@"
|
|
}
|