Fix etcd SyncCluster and Integration tests

Signed-off-by: Alexandre Beslic <abronan@docker.com>
This commit is contained in:
Alexandre Beslic 2015-05-27 18:48:38 -07:00
parent a43a1a869d
commit 6eb5cd3b5c
2 changed files with 11 additions and 6 deletions

View File

@ -51,6 +51,7 @@ func InitializeEtcd(addrs []string, options *Config) (Store, error) {
}
}
s.client.SyncCluster()
return s, nil
}

View File

@ -2,8 +2,9 @@
load discovery_helpers
# Address on which the store will listen (random port between 8000 and 9000).
STORE_HOST=127.0.0.1:$(( ( RANDOM % 1000 ) + 9000 ))
# Port and Address on which the store will listen (random port between 8000 and 9000).
PORT=$((RANDOM % 1000 + 9000))
STORE_HOST=127.0.0.1:$PORT
# Discovery parameter for Swarm
DISCOVERY="etcd://${STORE_HOST}/test"
@ -12,11 +13,14 @@ DISCOVERY="etcd://${STORE_HOST}/test"
CONTAINER_NAME=swarm_etcd
function start_store() {
docker_host run -p $STORE_HOST:4001 \
--name=$CONTAINER_NAME -d \
docker_host run -d \
--net=host \
--name=$CONTAINER_NAME \
quay.io/coreos/etcd:v2.0.11 \
--listen-client-urls=http://0.0.0.0:2379,http://0.0.0.0:4001 \
--advertise-client-urls=http://$STORE_HOST
--listen-client-urls="http://0.0.0.0:${PORT}" \
--advertise-client-urls="http://${STORE_HOST}"
sleep 3
}
function stop_store() {