From 591fd798076ec60d11b1b3cd4401a7aa857d9917 Mon Sep 17 00:00:00 2001 From: Douglas Lowe <10961945+douglowe@users.noreply.github.com> Date: Mon, 12 Jan 2026 16:41:28 +0000 Subject: [PATCH 1/2] docker project specified for local integration testing --- tests/test_integration.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/test_integration.py b/tests/test_integration.py index 2b4b9a7..c83cc6b 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -6,7 +6,7 @@ import os import docker from minio import Minio - +import uuid @pytest.fixture(scope="session") def docker_client(): @@ -17,8 +17,11 @@ def docker_client(): def docker_compose(docker_client): """Start Docker Compose before tests, shut down after.""" print("Starting Docker Compose...") + + PROJECT = f"test_{uuid.uuid4().hex}" + subprocess.run( - ["docker", "compose", "-f", "docker-compose-develop.yml", "up", "-d"], + ["docker", "compose", "-f", "docker-compose-develop.yml", "-p", PROJECT, "up", "-d"], check=True ) time.sleep(10) # Wait for services to start — adjust as needed @@ -35,7 +38,7 @@ def docker_compose(docker_client): print(logs) print("Stopping Docker Compose...") - subprocess.run(["docker", "compose", "down"], check=True) + subprocess.run(["docker", "compose", "-p", PROJECT, "down", "-v"], check=True) def load_test_data_into_minio(): @@ -50,9 +53,7 @@ def load_test_data_into_minio(): bucket_name = "ro-crates" test_data_dir = "tests/data/ro_crates" - # Ensure bucket exists - if not minio_client.bucket_exists(bucket_name): - minio_client.make_bucket(bucket_name) + minio_client.make_bucket(bucket_name) # Walk and upload files for root, _, files in os.walk(test_data_dir): From e9b436ed8b04021baf69ffcd9ee69c2df25dc338 Mon Sep 17 00:00:00 2001 From: Douglas Lowe <10961945+douglowe@users.noreply.github.com> Date: Mon, 12 Jan 2026 16:46:18 +0000 Subject: [PATCH 2/2] white space cleanup --- tests/test_integration.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_integration.py b/tests/test_integration.py index c83cc6b..1e90a1a 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -8,6 +8,7 @@ from minio import Minio import uuid + @pytest.fixture(scope="session") def docker_client(): return docker.from_env()