From fea49b05c8187c95514d077c421bc09ad009490e Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Thu, 18 Aug 2016 13:08:31 -0400 Subject: [PATCH] Logging for Tomcat and Shibboleth IDP externalized --- bin/ci-run.sh | 4 +++- bin/ci-stop.sh | 2 ++ tests/running.bats | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/ci-run.sh b/bin/ci-run.sh index 755e216..44c5a23 100755 --- a/bin/ci-run.sh +++ b/bin/ci-run.sh @@ -3,4 +3,6 @@ # This file will run a container in the background source common.bash . -docker run -d --name=$imagename -p 8080:8080 $maintainer/$imagename \ No newline at end of file +docker run -d --name=$imagename -v $PWD/logs/tomcat:/usr/local/tomcat/logs:rw \ + -v $PWD/logs/shibboleth_idp:/opt/shibboleth/shibboleth-identity-provider-$version/logs:rw \ + -p 8080:8080 $maintainer/$imagename \ No newline at end of file diff --git a/bin/ci-stop.sh b/bin/ci-stop.sh index 2ac6a32..79d421c 100755 --- a/bin/ci-stop.sh +++ b/bin/ci-stop.sh @@ -3,6 +3,8 @@ # This file will run a container in the background source common.bash . +rm logs/tomcat/* +rm logs/shibboleth_idp/* echo "Cleaning up Docker image($maintainer/$imagename)" docker stop $imagename >> /dev/null docker rm $imagename diff --git a/tests/running.bats b/tests/running.bats index 4e0ab1b..228e70c 100644 --- a/tests/running.bats +++ b/tests/running.bats @@ -24,3 +24,11 @@ load ../common [ "$status" -eq 0 ] [ ${output} == *"200"* ] } + +@test "Tomcat log directory log volume" { + find logs/tomcat/catalina.*.log +} + +@test "Shibboleth log directory log volume" { + find logs/shibboleth_idp/idp-process.log +} \ No newline at end of file