mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
Revert "testing: fixtures: fix docker regression"
This reverts commit b80d84e689.
This commit is contained in:
+1
-13
@@ -219,12 +219,7 @@ def docker_compose_project_name():
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def docker_services(
|
||||
request,
|
||||
tmp_path_factory,
|
||||
docker_compose_file,
|
||||
docker_compose_project_name,
|
||||
):
|
||||
def docker_services(request, tmp_path_factory):
|
||||
if os.environ.get("CI") and os.name == "nt":
|
||||
pytest.skip("disabled for Windows on CI")
|
||||
|
||||
@@ -243,16 +238,9 @@ def docker_services(
|
||||
|
||||
from filelock import FileLock
|
||||
|
||||
# pylint: disable-next=import-error
|
||||
from pytest_docker.plugin import DockerComposeExecutor, Services
|
||||
|
||||
executor = DockerComposeExecutor(docker_compose_file, docker_compose_project_name)
|
||||
|
||||
# making sure we don't accidentally launch docker-compose in parallel,
|
||||
# as it might result in network conflicts. Inspired by:
|
||||
# https://pytest-xdist.readthedocs.io/en/stable/how-to.html#making-session-scoped-fixtures-execute-only-once
|
||||
root = tmp_path_factory.getbasetemp().parent
|
||||
with FileLock(os.fspath(root / "docker-compose.lock")):
|
||||
yield request.getfixturevalue("docker_services")
|
||||
|
||||
return Services(executor)
|
||||
|
||||
Reference in New Issue
Block a user