Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.09 KB

README.md

File metadata and controls

34 lines (26 loc) · 1.09 KB

BATS (bash automated testing system)

Build Status Docker Pulls Image Size

This is a docker image containing bats-core and a few other useful bits: jq, make, curl, docker, git

Usage

docker run --rm -v $(pwd):/app graze/bats /app/tests

Usage with docker

To be able to run docker commands within this container you need to mount the docker sock:

docker run --rm \
    -v $(pwd):/app \
    -v /var/run/docker.sock:/var/run/docker.sock \
    graze/bats /app/tests
@test "entrypoint is bats" {
  run bash -c "docker inspect graze/bats:$tag | jq -r '.[].Config.Entrypoint[]'"
  echo 'status:' $status
  echo 'output:' $output
  [ "$status" -eq 0 ]
  [ "$output" = "/usr/local/bin/bats" ]
}