Giter VIP home page Giter VIP logo

Comments (5)

roger-duthie-pivotal avatar roger-duthie-pivotal commented on September 1, 2024 1

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.

ColeDCrawford avatar ColeDCrawford commented on September 1, 2024

Any thoughts @Luminaar ?

from pytest-docker.

n1ngu avatar n1ngu commented on September 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.