diff --git a/packages/pytest-simcore/src/pytest_simcore/docker_compose.py b/packages/pytest-simcore/src/pytest_simcore/docker_compose.py index 974fd9d9832..db34d158938 100644 --- a/packages/pytest-simcore/src/pytest_simcore/docker_compose.py +++ b/packages/pytest-simcore/src/pytest_simcore/docker_compose.py @@ -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 ( @@ -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}"} diff --git a/packages/pytest-simcore/src/pytest_simcore/helpers/utils_docker.py b/packages/pytest-simcore/src/pytest_simcore/helpers/utils_docker.py index 60afb8c088c..3d5502e6bfb 100644 --- a/packages/pytest-simcore/src/pytest_simcore/helpers/utils_docker.py +++ b/packages/pytest-simcore/src/pytest_simcore/helpers/utils_docker.py @@ -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")