Helm chart bugfixes + end to end test bugfixes (#293)

Helm Chart fixes: bump chart version, parameterize image pull policy, pass poolmgr url to router.

E2E test: add a simple hello world test. Make test runner dump fission logs after test.
This commit is contained in:
Soam Vasani
2017-08-23 07:00:49 -07:00
committed by GitHub
parent dd6bfd73e2
commit 3693082004
11 changed files with 178 additions and 22 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
set -euo pipefail
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"
fission env delete --name nodejs || true
echo "Creating nodejs env"
fission env create --name nodejs --image fission/node-env
trap "fission env delete --name nodejs" EXIT
echo "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"
fission route create --function $fn --url /$fn --method GET
echo "Waiting for router to catch up"
sleep 3
echo "Doing an HTTP GET on the function's route"
response=$(curl http://$FISSION_ROUTER/$fn)
echo "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."