https://github.com/graze/docker-bats
docker image for BATS
https://github.com/graze/docker-bats
bats docker
Last synced: 7 months ago
JSON representation
docker image for BATS
- Host: GitHub
- URL: https://github.com/graze/docker-bats
- Owner: graze
- Created: 2017-07-19T11:18:17.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-22T18:12:47.000Z (almost 2 years ago)
- Last Synced: 2025-01-18T11:23:58.707Z (9 months ago)
- Topics: bats, docker
- Language: Shell
- Size: 7.81 KB
- Stars: 2
- Watchers: 12
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BATS (bash automated testing system)
[](https://travis-ci.org/graze/docker-bats)
[](https://hub.docker.com/r/graze/bats/)
[](https://microbadger.com/images/graze/bats)This is a docker image containing [bats-core](https://github.com/bats-core/bats-core) and a few other useful bits: [jq](https://stedolan.github.io/jq/), make, curl, docker, git
## Usage
```bash
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:
```bash
docker run --rm \
-v $(pwd):/app \
-v /var/run/docker.sock:/var/run/docker.sock \
graze/bats /app/tests
``````sh
@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" ]
}
```