From 54e9730b2f41a627000110e06d264db856d753b8 Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Tue, 2 Aug 2016 16:08:57 -0400 Subject: [PATCH] Failing test on logs directory and ownership --- Dockerfile | 6 ++++++ tests/image.bats | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..91ebc94 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM bigfleet/shibboleth_idp + +ARG maintainer=tier +ARG imagename=shibboleth_idp +ARG version=3.2.1 +ENV VERSION=$version \ No newline at end of file diff --git a/tests/image.bats b/tests/image.bats index 08b1215..4f0ce20 100644 --- a/tests/image.bats +++ b/tests/image.bats @@ -19,4 +19,10 @@ setup() { @test "Contains java" { run docker run -i $maintainer/$imagename which java [ "$status" -eq 0 ] -} \ No newline at end of file +} + +@test "Logs directory exists, owned by root" { + result="$(docker run -i $maintainer/$imagename stat -c '%U' /opt/shibboleth/current/logs)" + [ "$result" != 'UNKNOWN' ] + [ "$status" -eq 0 ] +}