File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,22 @@ def docker_compose_file(pytestconfig):
108108 return os.path.join(str(pytestconfig.rootdir), "mycustomdir", "docker-compose.yml")
109109` ` `
110110
111+ To use [multiple compose files](https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/),
112+ return a list of paths from the `docker_compose_file` fixture :
113+
114+ ` ` ` python
115+ import os
116+ import pytest
117+
118+
119+ @pytest.fixture(scope="session")
120+ def docker_compose_file(pytestconfig):
121+ return [
122+ os.path.join(str(pytestconfig.rootdir), "tests", "compose.yml"),
123+ os.path.join(str(pytestconfig.rootdir), "tests", "compose.override.yml"),
124+ ]
125+ ` ` `
126+
111127# # Available fixtures
112128
113129By default the scope of the fixtures are `session` but can be changed with
You can’t perform that action at this time.
0 commit comments