Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error "temp_make fails with "unrecognized option: directory" #9

Merged
merged 2 commits into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}