Added describe pods in case of integration test failures.

This commit is contained in:
smruthi2187
2018-02-08 13:58:44 -08:00
parent bce45d6d25
commit a98370ca63
12 changed files with 163 additions and 139 deletions
+8 -8
View File
@@ -7,30 +7,30 @@ ROOT=$(dirname $0)/../..
fn=nodejs-hello-$(date +%N)
# Create a hello world function in nodejs, test it with an http trigger
echo "Pre-test cleanup"
echo_log "Pre-test cleanup"
fission env delete --name nodejs || true
echo "Creating nodejs env"
echo_log "Creating nodejs env"
fission env create --name nodejs --image fission/node-env
trap "fission env delete --name nodejs" EXIT
echo "Creating function"
echo_log "Creating function"
fission fn create --name $fn --env nodejs --code $ROOT/examples/nodejs/hello.js
trap "fission fn delete --name $fn" EXIT
echo "Creating route"
echo_log "Creating route"
fission route create --function $fn --url /$fn --method GET
echo "Waiting for router to catch up"
echo_log "Waiting for router to catch up"
sleep 3
echo "Doing an HTTP GET on the function's route"
echo_log "Doing an HTTP GET on the function's route"
response=$(curl http://$FISSION_ROUTER/$fn)
echo "Checking for valid response"
echo_log "Checking for valid response"
echo $response | grep -i hello
# crappy cleanup, improve this later
kubectl get httptrigger -o name | tail -1 | cut -f2 -d'/' | xargs kubectl delete httptrigger
echo "All done."
echo_log "All done."