Skip to content
Permalink
Browse files

Reorganizing test suite, updating binscripts

  • Loading branch information
Jim Van Fleet
Jim Van Fleet committed Aug 3, 2016
1 parent 4212f68 commit 12f5269169f6bc29d30e0d8dc3d0e2e895853d6c
Showing with 37 additions and 6 deletions.
  1. +2 −0 .gitignore
  2. +4 −1 Dockerfile
  3. +16 −1 Jenkinsfile
  4. +0 −4 tests/image.bats
  5. +15 −0 tests/running.bats
@@ -5,6 +5,8 @@ bin/rebuild.sh
bin/rerun.sh
bin/run.sh
bin/test.sh
bin/start.sh
bin/stop.sh
root/**
shibboleth-identity-provider.tar.gz
test.log
@@ -5,4 +5,7 @@ ARG imagename=shibboleth_idp
ARG version=3.2.1
ENV VERSION=$version

RUN chown -R root:root /opt/shibboleth/shibboleth-identity-provider-$version
RUN chown -R root:root /opt/shibboleth/shibboleth-identity-provider-$version

EXPOSE 8080
CMD ["catalina.sh", "run"]
@@ -20,7 +20,22 @@ node {
dir('root'){
git([ url: "https://github.internet2.edu/docker/shib-idp-conftree.git",
branch: "test", credentialsId: "jenkins-github-access-token" ])
}
}

stage 'Build'

def maintainer = maintainer()
def imagename = imagename()
def tag = env.BRANCH_NAME
if(!imagename){
echo "You must define an imagename in common.bash"
currentBuild.result = 'FAILURE'
}
if(maintainer){
echo "Building ${maintainer}:${tag} for ${maintainer}"
}

sh 'bin/rebuild.sh'

stage 'Tests'

@@ -2,10 +2,6 @@

load ../common

setup() {
./bin/rebuild.sh
}

@test "Creates non-root Shib IDP home" {
result="$(docker run -i $maintainer/$imagename ls /opt/shibboleth/current/bin/)"
[ "$result" != '' ]
@@ -0,0 +1,15 @@
#!/usr/bin/env bats

load ../common

setup() {
bin/start.sh
}

@test "Leaves running process" {
result="$(docker ps | grep $imagename)"
[ "$result" != '' ]
}
teardown() {
bin/stop.sh
}

0 comments on commit 12f5269

Please sign in to comment.
You can’t perform that action at this time.