From f0d5c3a44102ea52a2a80c8d3dfc111d55672a81 Mon Sep 17 00:00:00 2001 From: Pavol Mederly Date: Thu, 27 Sep 2018 17:16:51 +0200 Subject: [PATCH] Add a couple of Shibboleth composition tests --- Jenkinsfile | 1 + demo/shibboleth/test.sh | 33 +++++++++++++++++++++++++++++++++ test.sh | 1 + 3 files changed, 35 insertions(+) create mode 100755 demo/shibboleth/test.sh diff --git a/Jenkinsfile b/Jenkinsfile index 66cc578..d9e9865 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -51,6 +51,7 @@ pipeline { docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") { def baseImg = docker.build("$maintainer/$imagename", "--no-cache midpoint/midpoint-server") try { + sh 'docker pull tier/mariadb:mariadb10' // temporary sh 'env NOCOLOR=true ./test.sh' } finally { sh './cleanup.sh' diff --git a/demo/shibboleth/test.sh b/demo/shibboleth/test.sh new file mode 100755 index 0000000..c23693b --- /dev/null +++ b/demo/shibboleth/test.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +trap 'exitcode=$? ; error "Exiting $0 because of an error ($exitcode) occurred" ; exit $exitcode' ERR + +cd "$(dirname "$0")" +. ../../test/common.sh + +heading "Cleaning up containers and volumes if they exist" +docker-compose down -v || true +ok "Done" +echo + +heading "Composing and starting Shibboleth..." +docker-compose up --build -d +ok "OK" +echo + +# TODO wait for Shib to start + +heading "Composing and starting midPoint..." +pushd ../../midpoint +MPDIR=`pwd` +docker-compose down -v || true +env AUTHENTICATION=shibboleth docker-compose up --build -d +popd +$MPDIR/test/t010-wait-for-start.sh +ok "OK" +echo + +heading "Test 100: Checking health via HTTP..." +$MPDIR/test/t100-check-health.sh +ok "Health check passed" +echo diff --git a/test.sh b/test.sh index f42c8b9..65527cf 100755 --- a/test.sh +++ b/test.sh @@ -8,6 +8,7 @@ yellow "*** Testing midPoint image yellow "**************************************************************************************" echo midpoint/test.sh +demo/shibboleth/test.sh echo lgreen "**************************************************************************************" lgreen "*** All tests passed ***"