fix: einstellungen nur aus umgebungsvariablen lesen
Die .env-Datei im Arbeitsverzeichnis wurde mitgelesen. Beim Testlauf aus dem Projektordner gelangte so die Deployment-Konfiguration (LOGIN_IP_LOCKOUT=true) in die Tests. Im Container übergibt Compose die Werte ohnehin als Umgebungsvariablen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9748396478
commit
a444f28681
1 file changed
+3
-1
@@ -5,7 +5,9 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
||||
# Only real environment variables; compose passes .env via env_file. Reading a .env
|
||||
# file here would leak the deployment config into tests run from the project root.
|
||||
model_config = SettingsConfigDict(extra="ignore")
|
||||
|
||||
data_dir: Path = Path("/data")
|
||||
static_dir: Path = Path("/app/static")
|
||||
|
||||
Reference in new issue
Block a user