Skip to content

Remove need for docker in pytest tests #799

@cbeach47

Description

@cbeach47

Describe the issue
Certain automated tests run via pytest uses a postgres docker container, which requires the host system to have Docker Engine / Desktop running, and in some cases, the following environment variables set:

export DOCKER_HOST=unix://$HOME/.docker/run/docker.sock
export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=$HOME/.docker/run/docker.sock

Remove this dependency and instead use the testing.postgresql python library. As per Claude:

pip install testing.postgresql
...
import testing.postgresql

@pytest.fixture(scope="session")
def postgres_server():
    with testing.postgresql.Postgresql() as postgresql:
        yield postgresql.url()

Ensure uv run python pytest runs successfully with Docker Engine / Desktop turned offf.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions