From d937f6f776c3bc92bdc40f6c14d93f3eb39d6017 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 12 Jun 2014 21:17:25 -0700 Subject: [PATCH] working on a better e2e test --- cluster/config-test.sh | 2 +- hack/e2e-test.sh | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/cluster/config-test.sh b/cluster/config-test.sh index aceef0482fd..aa0df6e22d7 100755 --- a/cluster/config-test.sh +++ b/cluster/config-test.sh @@ -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 diff --git a/hack/e2e-test.sh b/hack/e2e-test.sh index 72051a609ec..1e95f48d341 100755 --- a/hack/e2e-test.sh +++ b/hack/e2e-test.sh @@ -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.