This repository is used to create a Docker image embedding bats, a bash-testing framework.
Run the docker image, with your tests mounted inside the container:
$ docker run \
v $(PWD):/app \
techangels/bats \
/app/my-tests
The image container a docker client, so you can even run docker tests inside the container:
docker run -t -v $PWD:/app -v /var/run/docker.sock:/docker.sock -e DOCKER_HOST="unix:///docker.sock" --rm techangels/bats /app/tests
#!/usr/bin/env bats
@test "With no cmd/args, the image return Bats version" {
run bash -c 'docker run -it --rm techangels/bats:${VERSION} | grep "Bats" | grep "Bats 0.4.0"'
[ "$status" -eq 0 ]
}