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.
This commit is contained in:
@@ -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": (
|
||||
|
||||
@@ -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": (
|
||||
|
||||
Reference in New Issue
Block a user