From 141a642639326844f5898cebbc096e1b4109c1e4 Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Wed, 27 Jul 2016 16:45:11 -0400 Subject: [PATCH 1/3] Failing image tests --- Dockerfile | 0 tests/image.bats | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 Dockerfile create mode 100644 tests/image.bats diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e69de29 diff --git a/tests/image.bats b/tests/image.bats new file mode 100644 index 0000000..504fe72 --- /dev/null +++ b/tests/image.bats @@ -0,0 +1,27 @@ +#!/usr/bin/env bats + +load ../common + +setup() { + ./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 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 From 6700ea50501f7b17694fd5f2a60fcff24948741d Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Wed, 27 Jul 2016 17:13:37 -0400 Subject: [PATCH 2/3] Good failure on structure of adding conf tree --- Dockerfile | 15 +++++++++++++++ tests/image.bats | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e69de29..9d98128 100644 --- a/Dockerfile +++ 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 index 504fe72..0357eb5 100644 --- a/tests/image.bats +++ b/tests/image.bats @@ -16,7 +16,12 @@ setup() { [ "$result" != '' ] } -@test "Retains first-run experience" { +@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" != '' ] } From b25b06b9f978da3201a32662a4ec41fb01eb0e2d Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Wed, 27 Jul 2016 17:15:59 -0400 Subject: [PATCH 3/3] Trying to get better failures out of build box --- tests/image.bats | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/image.bats b/tests/image.bats index 0357eb5..ea8640b 100644 --- a/tests/image.bats +++ b/tests/image.bats @@ -3,6 +3,7 @@ load ../common setup() { + echo $PWD > test.log ./bin/rebuild.sh }