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

Commit

Permalink
Parallelise sanity checks in order to speed them up.
Browse files Browse the repository at this point in the history
  • Loading branch information
marccarre committed Dec 14, 2016
1 parent 6592a9a commit e88744b
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions test/sanity_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,42 @@
set -e

whitely echo Ping each host from the other

for host in $HOSTS; do
for other in $HOSTS; do
[ $host = $other ] || run_on $host $PING $other
if [ "$host" != "$other" ]; then
run_on $1 $PING $2 $host $other &
pids="$pids $!"
fi
done
done
for pid in $pids; do wait $pid; done
unset pids


whitely echo Check we can reach docker

function check_docker() {
docker_version=$(docker_on $1 version)
docker_info=$(docker_on $1 info)
docker_weave_version=$(docker inspect -f {{.Created}} weaveworks/weave:${WEAVE_VERSION:-latest})
weave_version=$(weave_on $1 version)
cat << EOF
Host Version Info: $1
=====================================
# docker version
$docker_version
# docker info
$docker_info
# weave version
$docker_weave_version
$weave_version
EOF
}

for host in $HOSTS; do
echo
echo Host Version Info: $host
echo =====================================
echo "# docker version"
docker_on $host version
echo "# docker info"
docker_on $host info
echo "# weave version"
docker inspect -f {{.Created}} weaveworks/weave:${WEAVE_VERSION:-latest}
weave_on $host version
check_docker $host &
pids="$pids $!"
done
for pid in $pids; do wait $pid; done

0 comments on commit e88744b

Please sign in to comment.