From 9fde586938c39bf9ce4e1f164f3bb9e7bfe057b1 Mon Sep 17 00:00:00 2001 From: Mondo Diaz Date: Wed, 21 Jan 2026 15:16:26 +0000 Subject: [PATCH] Fix concurrent upload tests to use ORCHARD_TEST_URL env var The concurrent upload tests were hardcoding localhost:8080 for worker threads, but CI sets ORCHARD_TEST_URL to the actual server hostname. This caused "Connection refused" errors in CI. --- backend/tests/integration/test_large_uploads.py | 3 ++- backend/tests/integration/test_upload_download_api.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/tests/integration/test_large_uploads.py b/backend/tests/integration/test_large_uploads.py index 83b42b5..e18c7fc 100644 --- a/backend/tests/integration/test_large_uploads.py +++ b/backend/tests/integration/test_large_uploads.py @@ -12,6 +12,7 @@ Note: Large tests are marked with @pytest.mark.slow and will be skipped by default. Run with `pytest --run-slow` to include them. """ +import os import pytest import io import time @@ -512,7 +513,7 @@ class TestConcurrentUploads: content, expected_hash = sized_content(SIZE_100KB, seed=900 + idx) - base_url = "http://localhost:8080" + base_url = os.environ.get("ORCHARD_TEST_URL", "http://localhost:8080") with Client(base_url=base_url, timeout=30.0) as client: files = { "file": ( diff --git a/backend/tests/integration/test_upload_download_api.py b/backend/tests/integration/test_upload_download_api.py index 21b7284..936a4ca 100644 --- a/backend/tests/integration/test_upload_download_api.py +++ b/backend/tests/integration/test_upload_download_api.py @@ -10,6 +10,7 @@ Tests cover: - S3 storage verification """ +import os import pytest import io import threading @@ -540,7 +541,7 @@ class TestConcurrentUploads: try: from httpx import Client - base_url = "http://localhost:8080" + base_url = os.environ.get("ORCHARD_TEST_URL", "http://localhost:8080") with Client(base_url=base_url, timeout=30.0) as client: files = { "file": (