Compare commits
2 Commits
feature/ad
...
fe07638485
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe07638485 | ||
|
|
7120cf64f1 |
@@ -68,13 +68,12 @@ def get_admin_password() -> str:
|
||||
Returns the password from ORCHARD_TEST_PASSWORD environment variable,
|
||||
or 'changeme123' as the default for local development.
|
||||
"""
|
||||
# Use 'or' to handle empty string (when CI variable is undefined)
|
||||
return os.environ.get("ORCHARD_TEST_PASSWORD") or "changeme123"
|
||||
return os.environ.get("ORCHARD_TEST_PASSWORD", "changeme123")
|
||||
|
||||
|
||||
def get_admin_username() -> str:
|
||||
"""Get the admin username for test authentication."""
|
||||
return os.environ.get("ORCHARD_TEST_USERNAME") or "admin"
|
||||
return os.environ.get("ORCHARD_TEST_USERNAME", "admin")
|
||||
|
||||
|
||||
# Re-export factory functions for backward compatibility
|
||||
@@ -249,9 +248,9 @@ def integration_client():
|
||||
import httpx
|
||||
|
||||
# Connect to the running orchard-server container or deployed environment
|
||||
base_url = os.environ.get("ORCHARD_TEST_URL") or "http://localhost:8080"
|
||||
username = get_admin_username()
|
||||
password = get_admin_password()
|
||||
base_url = os.environ.get("ORCHARD_TEST_URL", "http://localhost:8080")
|
||||
username = os.environ.get("ORCHARD_TEST_USERNAME", "admin")
|
||||
password = os.environ.get("ORCHARD_TEST_PASSWORD", "changeme123")
|
||||
|
||||
with httpx.Client(base_url=base_url, timeout=30.0) as client:
|
||||
# Login as admin to enable write operations
|
||||
|
||||
Reference in New Issue
Block a user