feat(slice-1): platform/config — single env-driven config surface (INV-8)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-10 08:35:16 -07:00
parent 4acab40653
commit 346e7f2e22
2 changed files with 32 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import os
from app.platform import config
def test_database_url_defaults_to_local_compose(monkeypatch):
monkeypatch.delenv("ECOMM_DATABASE_URL", raising=False)
assert config.database_url() == "postgresql://ecomm:ecomm@localhost:5432/ecomm"
def test_database_url_honors_env(monkeypatch):
monkeypatch.setenv("ECOMM_DATABASE_URL", "postgresql://x:y@db:5432/z")
assert config.database_url() == "postgresql://x:y@db:5432/z"