Commit 0d48a53d authored by Geoff Simmons's avatar Geoff Simmons

Add an e2e test for changing the TLS Secret in an Ingress.

The Ingress is updated by changing to a Secret with a different name.
parent e4a77210
...@@ -43,8 +43,11 @@ upgrade: ...@@ -43,8 +43,11 @@ upgrade:
--values values-second.yaml --values values-second.yaml
# TESTOPTS are passed to varnishtest, e.g.: make TESTOPTS=-v verify # TESTOPTS are passed to varnishtest, e.g.: make TESTOPTS=-v verify
verify: verify-first:
$(mkdir)/verify.sh $(mkdir)/verify.sh 1
verify-second:
$(mkdir)/verify.sh 2
wait: wait:
$(TESTDIR)/wait.sh app=varnish-ingress $(TESTDIR)/wait.sh app=varnish-ingress
......
#! /bin/bash -ex
MYDIR=$(dirname ${BASH_SOURCE[0]})
source ${MYDIR}/../../utils.sh
if [ $1 == '1' ]; then
ORG="Green Midget Cafe"
else
ORG="Brew HaHa"
fi
LOCALPORT=${LOCALPORT:-4443}
wait_until_ready app=varnish-ingress
wait_until_configured app=varnish-ingress default
kubectl port-forward svc/varnish-ingress ${LOCALPORT}:443 >/dev/null &
trap 'kill $(jobs -p)' EXIT
wait_for_port ${LOCALPORT}
CONNECT=cafe.example.com:443:localhost:4443
URI=https://cafe.example.com/coffee/foo/bar
curl --stderr - -s --connect-to ${CONNECT} -v -k ${URI} | grep -E 'HTTP/1.1 200 OK'
curl --stderr - -s --connect-to ${CONNECT} -v -k ${URI} | grep -E "subject:.+O=${ORG}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment