From 0d1ee26ed51cd75d259fc5727e6f0426e99871e5 Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Wed, 14 Sep 2016 10:11:49 -0400 Subject: [PATCH] One of the autoexec tests is passing --- Dockerfile | 5 +++-- container_files/autoexec/firstrun/touch.sh | 3 +++ container_files/autoexec/onbuild/touch.sh | 3 +++ tests/image.bats | 8 ++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 container_files/autoexec/firstrun/touch.sh create mode 100755 container_files/autoexec/onbuild/touch.sh diff --git a/Dockerfile b/Dockerfile index 079a4b1..98811cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM bigfleet/grouper +FROM tier/grouper ARG maintainer=my ARG imagename=grouper @@ -16,7 +16,8 @@ RUN rm /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/conf/grouper.hibernate.propert rm /opt/grouper/2.3.0/grouper.ws-2.3.0/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.hibernate.properties && \ ln -s /opt/etc/grouper.hibernate.properties /opt/grouper/2.3.0/grouper.ws-2.3.0/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.hibernate.properties && \ rm /opt/grouper/2.3.0/grouper.ui-2.3.0/dist/grouper/WEB-INF/classes/grouper.hibernate.properties && \ - ln -s /opt/etc/grouper.hibernate.properties /opt/grouper/2.3.0/grouper.ui-2.3.0/dist/grouper/WEB-INF/classes/grouper.hibernate.properties + ln -s /opt/etc/grouper.hibernate.properties /opt/grouper/2.3.0/grouper.ui-2.3.0/dist/grouper/WEB-INF/classes/grouper.hibernate.properties && \ + /opt/autoexec/bin/onbuild.sh VOLUME /opt/grouper/$version/apache-tomcat-$TOMCAT_VERSION/logs VOLUME /etc/httpd/logs diff --git a/container_files/autoexec/firstrun/touch.sh b/container_files/autoexec/firstrun/touch.sh new file mode 100755 index 0000000..6d67992 --- /dev/null +++ b/container_files/autoexec/firstrun/touch.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +touch /opt/log/firstrun.log \ No newline at end of file diff --git a/container_files/autoexec/onbuild/touch.sh b/container_files/autoexec/onbuild/touch.sh new file mode 100755 index 0000000..b35fe31 --- /dev/null +++ b/container_files/autoexec/onbuild/touch.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +touch /opt/log/onbuild.log \ No newline at end of file diff --git a/tests/image.bats b/tests/image.bats index f64d3b6..4253666 100644 --- a/tests/image.bats +++ b/tests/image.bats @@ -15,4 +15,12 @@ load ../common @test "Contains java" { run docker run -i $maintainer/$imagename which java [ "$status" -eq 0 ] +} + +@test "Has fired autorun firstrun" { + docker run -i $maintainer/$imagename find /opt/log/firstrun.log +} + +@test "Has fired autorun onbuild" { + docker run -i $maintainer/$imagename find /opt/log/autoexec.build.log } \ No newline at end of file