The purpose of this repository is to define a generic set of feature files that can be used to test Docker images/containers.
The repository can be broken down into the following:
- examples - example feature file usage.
- features - generic feature files and step definitions
Feature files can be executed using rake.
docker run --rm -it \
-v $(pwd)/Dockerfile:/dockerdir/Dockerfile \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /dockerdir dockerbdd rake
- Turn generic feature set/tests into a RubyGem so they can be imported rather than duplicating features and step definitions in projects (see examples)
The docker containers are not terminated after the tests are executed, hence the following command should be run afterwards:
docker rm -f $(docker ps -a -q --filter 'name=container-to-delete')