mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
working on clustering test
This commit is contained in:
@@ -5,10 +5,20 @@
|
||||
start_suite "Launch 2 scopes and check they cluster"
|
||||
|
||||
weave_on $HOST2 launch
|
||||
container_id=$(start_container $HOST2)
|
||||
docker_on $HOST2 run -dit --name db1 peterbourgon/tns-db
|
||||
container_id=$(docker_on $HOST2 run -dit --name app1 --link db1:db1 peterbourgon/tns-app)
|
||||
|
||||
scope_on $HOST1 launch
|
||||
scope_on $HOST2 launch
|
||||
assert_raises "curl $HOST1:4040/api/topology/containers | grep '$container_id'"
|
||||
scope_on $HOST1 launch $HOST2
|
||||
scope_on $HOST2 launch $HOST1
|
||||
|
||||
SUCCESS=
|
||||
for i in {1..10}; do
|
||||
if (curl $HOST1:4040/api/topology/containers | grep "$container_id" >/dev/null); then
|
||||
SUCCESS=1
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
assert "echo $SUCCESS" "1"
|
||||
|
||||
end_suite
|
||||
|
||||
Reference in New Issue
Block a user