Comments (5)
why still check if docker is available and then ignore what the user configured?
The intent here is that localhost is supported as a fallback mechanism. It's not "disable Docker", it's "try Docker and resort to localhost when necessary".
My impression from the wording around docker_allow_fallback would be that if it returns
True
it doesn't try to run anything with Compose at all and just returnslocalhost:port
.
I agree that the wording in the README does not accurately describe what this feature does. I will try to updated it to better reflect how the feature works.
If the current behaviour is a problem for you, I'd consider a contribution that adds a "localhost only" mode.
Ideally, this should be a user preference (e.g. enabled using an environment variable), not a project preference.
from pytest-docker.
Awesome, thanks for the clarification. I'll see if I can come up with a PR to make this configurable.
from pytest-docker.
@AndreLouisCaron What's the usecase for the fallback? I'm not getting why use pytest-docker if you don't have Docker.
from pytest-docker.
@butla It was meant as a crutch while converting a bunch of projects from a prehistoric database installer setup to a Docker-based test runner. We needed to support the same test suite with both Docker and non-Docker setups while we onboarded a bunch of people to the new Docker workflow.
I don't expect anyone to rely on this anymore, but I never saw removing this as time well spent either :-)
from pytest-docker.
@AndreLouisCaron Ok, thanks for clarification :-)
from pytest-docker.
Related Issues (20)
- Allow user to customize `docker-compose up` command line flags HOT 3
- Unable to run in CI pipeline HOT 2
- `"docker-compose-v1": executable file not found in $PATH` when running from Makefile HOT 2
- How to add parametrize to our test case with pytest-docker? HOT 1
- Docs for multiple docker-compose files HOT 4
- Version Conflict with PyYAML 6.0 HOT 4
- Support for docker-compose V2 HOT 4
- Support for pytest v7
- Endpoint empty error HOT 5
- Project maintenance and activity HOT 1
- Skipping the setup in Gitlab CI HOT 3
- Insufficient removal of control characters on windows with cmd.exe as shell HOT 2
- How to wait for container to become healthy? HOT 3
- Allow for overriding of pytest fixture scope HOT 5
- same set of tests, many docker-compose.yml? HOT 1
- Fixture `docker_ip` not found HOT 4
- Utility to run arbitrary commands on a container HOT 2
- Generated docker compose command fails HOT 2
- Docker in docker HOT 4
- Executing multiple commands for `docker_setup` and `docker_cleanup` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-docker.