mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
fix(e2e): load .env after harness env defaults
This commit is contained in:
parent
8bdfd00a15
commit
53a3920a82
2 changed files with 10 additions and 4 deletions
|
|
@ -57,8 +57,6 @@ def _load_dotenv_and_set_env_defaults() -> None:
|
|||
"""
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
os.environ.setdefault(
|
||||
"DATABASE_URL",
|
||||
"postgresql+asyncpg://postgres:postgres@localhost:5432/surfsense",
|
||||
|
|
@ -122,6 +120,11 @@ def _load_dotenv_and_set_env_defaults() -> None:
|
|||
os.environ["SLACK_CLIENT_ID"] = "fake-slack-mcp-client-id"
|
||||
os.environ["SLACK_CLIENT_SECRET"] = "fake-slack-mcp-client-secret"
|
||||
|
||||
# Load .env last so the E2E defaults above win over a developer's .env
|
||||
# (e.g. AUTH_TYPE=GOOGLE), while an explicitly exported shell var still
|
||||
# beats both: setdefault respects it and load_dotenv() never overrides.
|
||||
load_dotenv()
|
||||
|
||||
|
||||
def _install_synthetic_global_llm_config() -> None:
|
||||
"""Materialise a fake ``app/config/global_llm_config.yaml`` for E2E.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue