changeset 628:ddf83317c7e0

patch compose env vars
author Alain Mazy <am@osimis.io>
date Thu, 22 Feb 2024 09:29:09 +0100
parents 76c9923050b5
children ed0a51317c0b
files NewTests/PostgresUpgrades/test_pg_upgrades.py
diffstat 1 files changed, 11 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/NewTests/PostgresUpgrades/test_pg_upgrades.py	Wed Feb 21 08:36:58 2024 +0100
+++ b/NewTests/PostgresUpgrades/test_pg_upgrades.py	Thu Feb 22 09:29:09 2024 +0100
@@ -51,11 +51,11 @@
         time.sleep(2)
 
         print("Launching newest Orthanc")
+        subprocesss_env = os.environ.copy()
+        subprocesss_env["ORTHANC_IMAGE_UNDER_TESTS"] = Helpers.orthanc_under_tests_docker_image
         subprocess.run(["docker", "compose", "up", "orthanc-pg-15-under-tests", "-d"], 
-            env= {
-                "ORTHANC_IMAGE_UNDER_TESTS": Helpers.orthanc_under_tests_docker_image
-            },
-            check=True)
+                       env=subprocesss_env, check=True)
+
 
         o = OrthancApiClient("http://localhost:8050")
         o.wait_started()
@@ -96,11 +96,10 @@
         time.sleep(2)
 
         print("Launching newest Orthanc")
+        subprocesss_env = os.environ.copy()
+        subprocesss_env["ORTHANC_IMAGE_UNDER_TESTS"] = Helpers.orthanc_under_tests_docker_image
         subprocess.run(["docker", "compose", "up", "orthanc-pg-15-under-tests", "-d"], 
-            env= {
-                "ORTHANC_IMAGE_UNDER_TESTS": Helpers.orthanc_under_tests_docker_image
-            },
-            check=True)
+                       env=subprocesss_env, check=True)
 
         o = OrthancApiClient("http://localhost:8050")
         o.wait_started()
@@ -159,12 +158,10 @@
         wait_container_healthy("pg-9")
 
         print("Launching newest Orthanc")
-        subprocess.run(
-            ["docker", "compose", "up", "orthanc-pg-9-under-tests", "-d"], 
-            env= {
-                "ORTHANC_IMAGE_UNDER_TESTS": Helpers.orthanc_under_tests_docker_image
-            },
-            check=True)
+        subprocesss_env = os.environ.copy()
+        subprocesss_env["ORTHANC_IMAGE_UNDER_TESTS"] = Helpers.orthanc_under_tests_docker_image
+        subprocess.run(["docker", "compose", "up", "orthanc-pg-9-under-tests", "-d"], 
+                       env=subprocesss_env, check=True)
 
         o = OrthancApiClient("http://localhost:8051")
         o.wait_started()