Skip to content

Commit

Permalink
python: Disable the --build option in pytest-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-mman committed Jan 20, 2025
1 parent 405e828 commit 5cd142e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,21 @@ def docker_compose_command():
# fallback on v1 otherwise
return "docker-compose"


# `pytest-docker` reads this to override the location of the docker-compose.yml file
@pytest.fixture(scope="session")
def docker_compose_file():
return [
os.path.join(os.path.dirname(__file__), "../../server/docker-compose.yml"),
os.path.join(os.path.dirname(__file__), "docker-compose.override.yml"),
]

# `pytest-docker` will use this fixture to override the setup command
@pytest.fixture(scope="session")
def docker_setup():
# Don't include the default --build option in the setup
return ["up -d"]

@pytest.fixture(scope="session")
def docker_compose(docker_services):
return docker_services._docker_compose
Expand Down

0 comments on commit 5cd142e

Please sign in to comment.