diff --git a/Dockerfile b/Dockerfile index 85dc7e7..1854a3f 100644 --- a/Dockerfile +++ b/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 diff --git a/container_files/bin/stub.sh b/container_files/bin/stub.sh new file mode 100755 index 0000000..08ba7a6 --- /dev/null +++ b/container_files/bin/stub.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo 'test' \ No newline at end of file diff --git a/tests/base.bats b/tests/base.bats index a5d301d..1777cce 100644 --- a/tests/base.bats +++ b/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 } \ No newline at end of file