changeset 627:76c9923050b5

patch Docker env var (thx James)
author Alain Mazy <am@osimis.io>
date Wed, 21 Feb 2024 08:36:58 +0100
parents 9c295b8dac00
children ddf83317c7e0
files NewTests/Concurrency/test_transfer.py
diffstat 1 files changed, 11 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/NewTests/Concurrency/test_transfer.py	Tue Feb 20 10:16:03 2024 +0100
+++ b/NewTests/Concurrency/test_transfer.py	Wed Feb 21 08:36:58 2024 +0100
@@ -18,28 +18,25 @@
     def cleanup(cls):
         os.chdir(here)
         print("Cleaning old compose")
+        subprocesss_env = os.environ.copy()
+        subprocesss_env["ORTHANC_IMAGE_UNDER_TESTS"] = Helpers.orthanc_under_tests_docker_image
         subprocess.run(["docker", "compose", "-f", "docker-compose-transfers-concurrency.yml", "down", "-v", "--remove-orphans"], 
-                       env= {
-                           "ORTHANC_IMAGE_UNDER_TESTS": Helpers.orthanc_under_tests_docker_image
-                       },
-                       check=True)
+                       env=subprocesss_env, check=True)
 
     @classmethod
     def compose_up(cls):
         # print("Pullling containers")
-        # subprocess.run(["docker", "compose", "-f", "docker-compose-transfers-concurrency.yml", "pull"],
-        #                env= {
-        #                    "ORTHANC_IMAGE_UNDER_TESTS": Helpers.orthanc_under_tests_docker_image,
-        #                    "PATH": os.environ.get('PATH')
-        #                },
-        #                check=True)
+        # subprocesss_env = os.environ.copy()
+        # subprocesss_env["ORTHANC_IMAGE_UNDER_TESTS"] = Helpers.orthanc_under_tests_docker_image
+        # subprocess.run(["docker", "compose", "-f", "docker-compose-transfers-concurrency.yml", "pull"], 
+        #                env=subprocesss_env, check=True)
 
         print("Compose up")
+        subprocesss_env = os.environ.copy()
+        subprocesss_env["ORTHANC_IMAGE_UNDER_TESTS"] = Helpers.orthanc_under_tests_docker_image
         subprocess.run(["docker", "compose", "-f", "docker-compose-transfers-concurrency.yml", "up", "-d"], 
-                       env= {
-                           "ORTHANC_IMAGE_UNDER_TESTS": Helpers.orthanc_under_tests_docker_image
-                       },                       
-                       check=True)        
+                       env=subprocesss_env, check=True)
+
 
     @classmethod
     def setUpClass(cls):