Skip to content
Permalink
Browse files

Ensuring autoexec bin scripts can terminate successfully

  • Loading branch information...
Jim Van Fleet
Jim Van Fleet committed Sep 13, 2016
1 parent e9adedc commit 8e84e96b3cc39eb7a4d34ba3572ea13408a12bce
Showing with 13 additions and 0 deletions.
  1. +2 −0 Dockerfile
  2. +3 −0 container_files/bin/stub.sh
  3. +8 −0 tests/base.bats
@@ -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
@@ -0,0 +1,3 @@
#!/bin/bash

echo 'test'
@@ -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.
You can’t perform that action at this time.