working on a better e2e test

This commit is contained in:
Daniel Smith 2014-06-12 21:17:25 -07:00
parent 9cd9754693
commit d937f6f776
2 changed files with 18 additions and 4 deletions

View File

@ -16,7 +16,7 @@
ZONE=us-central1-b
MASTER_SIZE=g1-small
MINION_SIZE=g1-small
NUM_MINIONS=2
NUM_MINIONS=3
# gcloud/gcutil will expand this to the latest supported image.
IMAGE=backports-debian-7-wheezy
NETWORK=default

View File

@ -50,12 +50,26 @@ gcutil addfirewall \
--norespect_terminal_width \
--project ${PROJECT} \
--target_tags ${MINION_TAG} \
--allowed tcp:8080 \
--allowed tcp:80 \
--network ${NETWORK} \
${MINION_TAG}-http-alt &
# Launch a container
$(dirname $0)/../cluster/cloudcfg.sh -p 8080:80 run dockerfile/nginx 2 myNginx
CLOUDCGF="$(dirname $0)/../cluster/cloudcfg.sh"
GUESTBOOK="$(dirname $0)/../.examples/guestbook"
# Launch the guestbook example
$CLOUDCFG -c "${GUESTBOOK}/redis-master.json" create /pods
$CLOUDCFG -c "${GUESTBOOK}/redis-master-service.json" create /services
$CLOUDCFG -c "${GUESTBOOK}/redis-slave-controller.json" create /replicationControllers
sleep 5
# Count number of pods-- should be 5 plus two lines of header
PODS_FOUND=$($CLOUDCFG list pods | wc -l)
echo $PODS_FOUND
exit 0
# Container turn up on a clean cluster can take a while for the docker image pull.
# Sleep for 2 minutes just to be sure.