Skip to content

Commit

Permalink
Tests run, include Shibboleth running
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Van Fleet committed Aug 4, 2016
1 parent 8f81a4a commit 4fe18da
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ ENV VERSION=$version
ENV JAVA_OPTS=-Xmx1500m -XX:MaxPermSize=128m

RUN chown -R root:root /opt/shibboleth/shibboleth-identity-provider-$version && \
rm -rf /usr/local/tomcat/webapps/* && \
ANT_OPTS="-Didp.target.dir=/opt/shibboleth/current" /opt/shibboleth/current/bin/build.sh && \
ln -s /opt/shibboleth/current /opt/shibboleth-idp && \
ln -s /opt/shibboleth-idp/war/idp.war $CATALINA_HOME/webapps/idp.war
ln -s /opt/shibboleth-idp/war/idp.war $CATALINA_HOME/webapps/ROOT.war

EXPOSE 8080
CMD ["catalina.sh", "run"]
5 changes: 5 additions & 0 deletions tests/image.bats
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ load ../common
result="$(docker run -i $maintainer/$imagename stat -c '%U' /opt/shibboleth/current/logs)"
[ "$result" != 'UNKNOWN' ]
}

@test "Other Tomcat webapps removed" {
result="$(docker run -i $maintainer/$imagename find /usr/local/tomcat/webapps -type d -print0)"
[ "$result" == '/usr/local/tomcat/webapps' ]
}
3 changes: 3 additions & 0 deletions tests/running.bats
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ load ../common
[ "$result" != '' ]
}

@test "Service is Shibboleth" {
docker exec -i $imagename curl -silent http://localhost:8080/ | grep 'Shibboleth'
}

0 comments on commit 4fe18da

Please sign in to comment.