{"repo":"kprestel/pytest-docker-db","free":true,"listed":false,"github":"https://github.com/kprestel/pytest-docker-db","clone":"git clone https://github.com/kprestel/pytest-docker-db.git","description":"A pytest plugin to use docker databases when running pytest","language":"Python","stars":18,"topics":["pytest-plugin","testing","python3","python-library","pytest","pytest-fixtures","docker","database"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"pytest-docker-db A plugin to use docker databases for pytests What is this? This is a pytest plugin that hooks into the host's :code: docker daemon to create and teardown containers within the pytest life cycle. Features - Use custom :code: Dockerfile s or base images from Dockerhub - Use volumes to persist test data in between testing sessions - Specify what port you want the container to be listening on the host machine and the container - Optionally persist the container between test sessions - Name the containers created Requirements - docker-py =6 - pytest =7 - docker Installation You can install pytest-docker-db via pip from PyPI Configuration - db-volume-args - Provide the \"-v\" arguments that you would pass to the \"docker run\" command if you were using the cli. If you need multiple volumes mounted separate them with commas. - The basic syntax is :code: /host/vol/path:/path/in/container:rw . If using a named volume, the syntax would be :code: vol-name:/path/in/container:rw 'For more information please visit the docker documentation ' - db-image - Specify the name of the image to use as the DB. - Must be in the form of \"image name\":\"tag\" . - db-name - Specify the name of the container. If this is not specified a random container name will be used with the prefix docker-db - db-host-port - Specify the port that the db should be listening to on the host machine. - db-port - Specify the port that the db should be listening to in the container. This is often the default port","default_branch":null,"files":null,"tree":[],"storefront":"/r/kprestel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kprestel/pytest-docker-db/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."}