Compare commits
6 Commits
fe07638485
...
feature/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15954b58f7 | ||
|
|
4fc8ca66e7 | ||
|
|
aeb805e975 | ||
|
|
0dd1eb6d59 | ||
|
|
0cf349ddb3 | ||
|
|
1f3e19d3a5 |
@@ -68,12 +68,13 @@ def get_admin_password() -> str:
|
||||
Returns the password from ORCHARD_TEST_PASSWORD environment variable,
|
||||
or 'changeme123' as the default for local development.
|
||||
"""
|
||||
return os.environ.get("ORCHARD_TEST_PASSWORD", "changeme123")
|
||||
# Use 'or' to handle empty string (when CI variable is undefined)
|
||||
return os.environ.get("ORCHARD_TEST_PASSWORD") or "changeme123"
|
||||
|
||||
|
||||
def get_admin_username() -> str:
|
||||
"""Get the admin username for test authentication."""
|
||||
return os.environ.get("ORCHARD_TEST_USERNAME", "admin")
|
||||
return os.environ.get("ORCHARD_TEST_USERNAME") or "admin"
|
||||
|
||||
|
||||
# Re-export factory functions for backward compatibility
|
||||
@@ -248,9 +249,9 @@ def integration_client():
|
||||
import httpx
|
||||
|
||||
# Connect to the running orchard-server container or deployed environment
|
||||
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")
|
||||
base_url = os.environ.get("ORCHARD_TEST_URL") or "http://localhost:8080"
|
||||
username = get_admin_username()
|
||||
password = get_admin_password()
|
||||
|
||||
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