Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

prefetch test images #989

Merged
merged 2 commits into from
Jun 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions test/610_proxy_wait_for_weave_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ start_suite "Proxy waits for weave to be ready before running container commands
weave_on $HOST1 launch-proxy
BASE_IMAGE=busybox
# Ensure the base image does not exist, so that it will be pulled
if (docker_on $HOST1 images $BASE_IMAGE | grep -q $BASE_IMAGE); then
docker_on $HOST1 rmi $BASE_IMAGE
fi
! docker_on $HOST1 inspect --format=" " $BASE_IMAGE >/dev/null 2>&1 || docker_on $HOST1 rmi $BASE_IMAGE

assert_raises "proxy docker_on $HOST1 run --name c1 -e 'WEAVE_CIDR=10.2.1.1/24' $BASE_IMAGE $CHECK_ETHWE_UP"

Expand Down
2 changes: 2 additions & 0 deletions test/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ SSH=${SSH:-ssh -l vagrant -i ./insecure_private_key -o UserKnownHostsFile=./.ssh

SMALL_IMAGE="gliderlabs/alpine"
DNS_IMAGE="aanand/docker-dnsutils"
TEST_IMAGES="$SMALL_IMAGE $DNS_IMAGE"

PING="ping -nq -W 1 -c 1"
CHECK_ETHWE_UP="grep ^1$ /sys/class/net/ethwe/carrier"

Expand Down
6 changes: 5 additions & 1 deletion test/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set -e

(cd ./tls && go get ./... && go run generate_certs.go $HOSTS)

echo Copying weave images, scripts, and certificates to hosts
echo "Copying weave images, scripts, and certificates to hosts, and"
echo " prefetch docker images"
for HOST in $HOSTS; do
docker_on $HOST load -i ../weave.tar
docker_on $HOST load -i ../weavedns.tar
Expand All @@ -16,4 +17,7 @@ for HOST in $HOSTS; do
cat ../weave | run_on $HOST sh -c "cat > ./weave"
run_on $HOST chmod a+x $DOCKER_NS ./weave
rsync -az -e "$SSH" ./tls/ $HOST:~/tls
for IMG in $TEST_IMAGES ; do
docker_on $HOST inspect --format=" " $IMG >/dev/null 2>&1 || docker_on $HOST pull $IMG
done
done