From 29c30569408e8fc5af7efc8db76133438120f3e8 Mon Sep 17 00:00:00 2001 From: Forrest Thomas Date: Wed, 2 Sep 2020 10:15:49 -0700 Subject: [PATCH] add e2e gloo tests for inconsistent naming between service name and selector --- test/e2e-gloo-tests.sh | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/test/e2e-gloo-tests.sh b/test/e2e-gloo-tests.sh index 75bad44d..c2456ee6 100755 --- a/test/e2e-gloo-tests.sh +++ b/test/e2e-gloo-tests.sh @@ -88,6 +88,59 @@ spec: logCmdOutput: "true" EOF +cat <>> Waiting for primary to be ready' retries=50 count=0 @@ -105,6 +158,19 @@ done echo '✔ Canary initialization test passed' +passed=$(kubectl -n test get svc/podinfo -o jsonpath='{.spec.selector.app}' 2>&1 | { grep podinfo-primary || true; }) +if [ -z "$passed" ]; then + echo -e '\u2716 podinfo selector test failed' + exit 1 +fi +passed=$(kubectl -n test get svc/podinfo-service-canary -o jsonpath='{.spec.selector.app}' 2>&1 | { grep podinfo || true; }) +if [ -z "$passed" ]; then + echo -e '\u2716 podinfo-service selector test failed' + exit 1 +fi + +echo '✔ Canary service custom metadata test passed' + echo '>>> Triggering canary deployment' kubectl -n test set image deployment/podinfo podinfod=stefanprodan/podinfo:3.1.1