Skip to content

Commit

Permalink
🐛Fix tests failing issue with newer docker compose (>2.21.0) (ITISFou…
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg authored Sep 6, 2023
1 parent 0357981 commit 7404e61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 1 addition & 6 deletions packages/pytest-simcore/src/pytest_simcore/docker_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import pytest
import yaml
from dotenv import dotenv_values, set_key
from dotenv import dotenv_values
from pytest import ExitCode

from .helpers import (
Expand Down Expand Up @@ -191,11 +191,6 @@ def inject_filestash_config_path_env(
filestash_config_json_path = Path(process.stdout.decode("utf-8").strip())
assert filestash_config_json_path.exists()

set_key(
env_file_for_testing,
"TMP_PATH_TO_FILESTASH_CONFIG",
f"{filestash_config_json_path}",
)
return {"TMP_PATH_TO_FILESTASH_CONFIG": f"{filestash_config_json_path}"}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,17 @@ def run_docker_compose_config(
cmd = [f"{docker_compose_path}"] + global_options
print(" ".join(cmd))

process_environment_variables = dict(os.environ)
if additional_envs:
process_environment_variables |= additional_envs

process = subprocess.run(
cmd,
shell=False,
check=True,
cwd=project_dir,
stdout=subprocess.PIPE,
env=additional_envs,
capture_output=True,
env=process_environment_variables,
)

compose_file_str = process.stdout.decode("utf-8")
Expand Down

0 comments on commit 7404e61

Please sign in to comment.