Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
shib-idp/tests/shibboleth-idp.bats
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
48 lines (38 sloc)
1.17 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bats | |
load ../common | |
@test "Creates non-root Shib IDP home" { | |
result="$(docker run -i $maintainer/$imagename ls /opt/shibboleth/current/bin/)" | |
[ "$result" != '' ] | |
} | |
@test "Retains first-run experience" { | |
result="$(docker run -i $maintainer/$imagename ls /tmp/firsttimerunning)" | |
[ "$result" != '' ] | |
} | |
@test "Tomcat will start Shibboleth IDP when started" { | |
result="$(docker run -i $maintainer/$imagename find conf/Catalina/idp.xml)" | |
[ "$result" != '' ] | |
} | |
@test "Does not contain java" { | |
run docker run -i $maintainer/$imagename which java | |
[ "$status" -eq 1 ] | |
} | |
@test "Contains tomcat" { | |
run docker run -i $maintainer/$imagename which startup.sh | |
[ "$status" -eq 0 ] | |
} | |
@test "Contains JSTL jar" { | |
run docker run -i $maintainer/$imagename find /usr/local/tomcat/lib/jstl1.2.jar | |
[ "$status" -eq 0 ] | |
} | |
@test "exports JAVA_HOME" { | |
result="$(docker run -i $maintainer/$imagename env | grep JAVA_HOME)" | |
[ "$result" != "" ] | |
} | |
@test "exports CATALINA_HOME" { | |
result="$(docker run -i $maintainer/$imagename env | grep CATALINA_HOME)" | |
[ "$result" != "" ] | |
} | |
@test "Defers configuration via ONBUILD" { | |
run grep ONBUILD Dockerfile | |
[ "$status" -eq 0 ] | |
} |