From 930eb8919dc9ba6df0cb4cacaacfddae9e26c0fd Mon Sep 17 00:00:00 2001 From: Forrest Thomas Date: Wed, 2 Sep 2020 10:47:41 -0700 Subject: [PATCH] add e2e linkerd tests for inconsistent naming between service name and selector --- test/e2e-linkerd-tests.sh | 66 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/test/e2e-linkerd-tests.sh b/test/e2e-linkerd-tests.sh index c93b3d73..d21a04fa 100755 --- a/test/e2e-linkerd-tests.sh +++ b/test/e2e-linkerd-tests.sh @@ -100,6 +100,59 @@ spec: logCmdOutput: "true" EOF +cat <>> Waiting for primary to be ready' retries=50 count=0 @@ -117,6 +170,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