Skip to content

Commit

Permalink
Merge pull request #9 from dduportal-dockerfiles/fix-temp-make
Browse files Browse the repository at this point in the history
Fix error "temp_make fails with "unrecognized option: directory"
  • Loading branch information
dduportal authored Sep 6, 2019
2 parents 15f4535 + c11b7fe commit da66b52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR /bats
RUN npm install

# Minimalistic image
FROM alpine:3.7
FROM alpine:3.10
LABEL Maintainer="Damien DUPORTAL <[email protected]>"
ENV BATS_HELPERS_DIR=/opt/bats-helpers

Expand All @@ -20,7 +20,7 @@ COPY --from=dependencies-solver /bats/node_modules/bats-file /opt/bats-helpers/b
COPY --from=dependencies-solver /bats/node_modules/bats-assert /opt/bats-helpers/bats-assert


RUN apk add --no-cache bash \
RUN apk add --no-cache bash coreutils \
&& ln -s /opt/bats/libexec/bats /sbin/bats

WORKDIR /tests
Expand Down
15 changes: 10 additions & 5 deletions tests/test-bats-dockerimage.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ setup() {
run_command_with_docker | grep "Bats" | grep "${BATS_VERSION}"
}

@test "Bash is installed" {
local CUSTOM_DOCKER_RUN_OPTS="--entrypoint which"
run_command_with_docker bash
}

@test "mktemp accepts the long flag --directory" {
local CUSTOM_DOCKER_RUN_OPTS="--entrypoint bash"
run_command_with_docker -c 'mktemp --directory'
}

@test "Environment variable for Bats Helper is set and valid" {
local CUSTOM_DOCKER_RUN_OPTS="--entrypoint bash"
run_command_with_docker -c 'test -d "${BATS_HELPERS_DIR}"'
Expand Down Expand Up @@ -44,8 +54,3 @@ setup() {
local CUSTOM_DOCKER_RUN_OPTS="-v $(pwd)/sample:/tests"
run_command_with_docker /tests/
}

@test "Bash is installed" {
local CUSTOM_DOCKER_RUN_OPTS="--entrypoint which"
run_command_with_docker bash
}

0 comments on commit da66b52

Please sign in to comment.