Skip to content

graze/docker-bats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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" ]
}