diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9d98128 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM bigfleet/shibboleth_idp:master + +ARG maintainer=tier +ARG imagename=shibboleth_idp_runtime +ARG version=3.2.1 +ENV VERSION=$version + +MAINTAINER $maintainer +LABEL Vendor="Internet2" +LABEL ImageType="Shibboleth IDP Release" +LABEL ImageName=$imagename +LABEL ImageOS=centos7 +LABEL Version=$VERSION + +CMD rm /tmp/firsttimerunning \ No newline at end of file diff --git a/tests/image.bats b/tests/image.bats new file mode 100644 index 0000000..ea8640b --- /dev/null +++ b/tests/image.bats @@ -0,0 +1,33 @@ +#!/usr/bin/env bats + +load ../common + +setup() { + echo $PWD > test.log + ./bin/rebuild.sh +} + +@test "Should be buildable" { + run bin/build.sh + [ "$status" -eq 0 ] +} + +@test "Retains non-root Shib IDP binaries" { + result="$(docker run -i $maintainer/$imagename ls /opt/shibboleth/current/bin/)" + [ "$result" != '' ] +} + +@test "Retains tree structure of new conf files" { + run "$(docker run -i $maintainer/$imagename find /opt/shibboleth/shibboleth-identity-provider-$version/js)" + [ "$status" -eq 1 ] +} + +@test "Concludes first-run experience" { + result="$(docker run -i $maintainer/$imagename ls /tmp/firsttimerunning)" + [ "$result" != '' ] +} + +@test "Contains java" { + run docker run -i $maintainer/$imagename which java + [ "$status" -eq 0 ] +} \ No newline at end of file