-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
limit services started by docker_services #54
Comments
I was reading the docs on fixtures and found that there is a way. @pytest.mark.docker_services_required(["postgres", "redis"])
def test_app_up(docker_services): I can try to raise a PR for this. |
Hello! Thanks for submitting the issue. |
Hello @Luminaar The idea that you are suggesting about keeping multiple docker-compose files would require me keep the files updated which I would like to avoid but presently I am doing that. Let me try to explain the use-case again. Imagine a local development setting, I write few tests, write some code to make it pass, then refactor and repeat Advantages:
Links discussing similar use cases: If it is still unclear, can you help me with what exactly is unclear? I can try to remedy that If you are clear on the use case, would you be able to review my suggestion? Thanks |
I think I understand. Would a new fixture that would allow specifying a custom Right now, A new fixture (called |
Do we require a new fixture? Can we go with pytest markers?
|
👍 👍 👍 |
Version 0.12.0 adds a way to customize docker-compose setup. |
docker_services
fixture starts all containers mentioned in thedocker-compose.yaml
.Is there some way to limit the services to some services? like
docker_services(excluding_services: List)
When in a development setting, this would be useful as we normally want to test the service with hot-reload functionality.
I checked fixture-parameterize, but that is intended for running against all the parameters provided 1 by 1.
The text was updated successfully, but these errors were encountered: