Comments (5)
I had this message when the Docker daemon was unavailable. There was a previous message in the exception stack that gave me the hint. Once the daemon was running, the pytest --fixtures [testpath]
command showed the previously missing fixtures and all was well running the tests.
Maybe this insight helps someone in the future? Does it help you @ColeDCrawford ??
from pytest-docker.
Any thoughts @Luminaar ?
from pytest-docker.
Looks like the pytest-docker plugin is simply not being loaded. Only the docker_compose_file
shows in your error message because it is overridden in your conftest.py. If you run the pytest --fixtures [testpath]
you were suggested, you should see a section like
------------------------------------------------ fixtures defined from pytest_docker.plugin ------------------------------------------------
docker_compose_command [session scope] -- .venv/lib/python3.10/site-packages/pytest_docker/plugin.py:133
Docker Compose command to use, it could be either `docker-compose`
for Docker Compose v1 or `docker compose` for Docker Compose
v2.
docker_compose_file [session scope] -- .venv/lib/python3.10/site-packages/pytest_docker/plugin.py:142
Get an absolute path to the `docker-compose.yml` file. Override this
fixture in your tests if you need a custom location.
docker_compose_project_name [session scope] -- .venv/lib/python3.10/site-packages/pytest_docker/plugin.py:150
Generate a project name using the current process PID. Override this
fixture in your tests if you need a particular project name.
docker_cleanup [session scope] -- .venv/lib/python3.10/site-packages/pytest_docker/plugin.py:163
Get the docker_compose command to be executed for test clean-up actions.
Override this fixture in your tests if you need to change clean-up actions.
Returning anything that would evaluate to False will skip this command.
docker_setup [session scope] -- .venv/lib/python3.10/site-packages/pytest_docker/plugin.py:177
Get the docker_compose command to be executed for test setup actions.
Override this fixture in your tests if you need to change setup actions.
Returning anything that would evaluate to False will skip this command.
docker_services [session scope] -- .venv/lib/python3.10/site-packages/pytest_docker/plugin.py:211
Start all services from a docker compose file (`docker-compose up`).
After test are finished, shutdown all services (`docker-compose down`).
docker_ip [session scope] -- .venv/lib/python3.10/site-packages/pytest_docker/plugin.py:46
Determine the IP address for TCP connections to Docker containers.
If you don't: check your pytest configuration as some option might be disabling the plugin autoload.
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
- Utility to run arbitrary commands on a container HOT 2
- Generated docker compose command fails HOT 3
- 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.