{"repo":"palantir/docker-compose-rule","free":true,"listed":false,"github":"https://github.com/palantir/docker-compose-rule","clone":"git clone https://github.com/palantir/docker-compose-rule.git","description":"A JUnit rule to manage docker containers using docker-compose","language":"Java","stars":426,"topics":["docker","docker-compose","junit","junit-rule","junit4","octo-correct-managed"],"license":"Apache-2.0","category":"deployment-docker-iac","readme_excerpt":"Docker Compose JUnit Rule ========================= This is a library for executing JUnit tests that interact with Docker Compose managed containers. It supports the following: - Starting containers defined in a docker-compose.yml before tests and tearing them down afterwards - Waiting for services to become available before running tests - Recording log files from containers to aid debugging test failures Why should I use this? ---------------------- The code here started out as the end to end tests for one of our products. We needed to test this product in a variety of different configurations and environments which were mutually incompatible, thus multiple Docker Compose files were needed and so a simplistic model of running docker-compose up in Gradle was insufficient. If you're experiencing any of the following using Docker for your testing this library should hopefully help: - Orchestrating multiple services and mapping the ports to outside the Docker machine so assertions can be made in tests - Needing to know when services are up to prevent flickering tests caused by slow to start services or complicated service dependencies - Lack of insight into what has happened in Docker containers during tests on CI servers due to loss of logs - Tests failing due to needing open ports on the CI build host which conflict with the test configuration Simple Use ---------- Add a dependency to your project. For example, in gradle: For the most basic use simply add a DockerComposeRule ","default_branch":null,"files":null,"tree":[],"storefront":"/r/palantir","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/palantir/docker-compose-rule/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}