Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensuring autoexec bin scripts can terminate successfully
Jim Van Fleet committed Sep 13, 2016
1 parent e9adedc commit 8e84e96
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
@@ -41,6 +41,8 @@ RUN update-ca-trust extract

ADD container_files/bin/firstrun.sh /opt/autoexec/bin/firstrun.sh
ADD container_files/bin/onbuild.sh /opt/autoexec/bin/onbuild.sh
ADD container_files/bin/stub.sh /opt/autoexec/firstrun/stub.sh
ADD container_files/bin/stub.sh /opt/autoexec/onbuild/stub.sh

# Set default environment variables.
ENV HOME /opt/tier
3 changes: 3 additions & 0 deletions container_files/bin/stub.sh
@@ -0,0 +1,3 @@
#!/bin/bash

echo 'test'
8 changes: 8 additions & 0 deletions tests/base.bats
@@ -29,4 +29,12 @@ load ../common

@test "Firstrun support home" {
docker run -i $maintainer/$imagename find /opt/autoexec/firstrun
}

@test "Onbuild terminates correctly" {
docker run -i $maintainer/$imagename /opt/autoexec/bin/onbuild.sh
}

@test "First run terminates correctly" {
docker run -i $maintainer/$imagename /opt/autoexec/bin/firstrun.sh
}

0 comments on commit 8e84e96

Please sign in to comment.