fix(config): harden bootstrap logic and add email E2E test

Harden bootstrap_db_config to prioritize .env settings for core infrastructure (DB/SMTP) and only use DB values if placeholders are detected or values have explicitly changed. Added test_e2e_email_send.py for functional SMTP verification.
This commit is contained in:
Scott Idem
2026-02-06 12:56:13 -05:00
parent 1053d8a81b
commit b10b5839c7
3 changed files with 110 additions and 51 deletions

View File

@@ -1,29 +0,0 @@
import sys
import os
import logging
# Add current directory to path
sys.path.append(os.getcwd())
# Configure logging
logging.basicConfig(level=logging.DEBUG)
try:
from app.lib_email import send_email
print("Successfully imported send_email.")
print("Running send_email in TEST mode...")
result = send_email(
from_email="test@example.com",
to_email="test@example.com",
subject="Test Email",
body_html="<p>Test</p>",
test=True
)
print(f"Result: {result}")
except Exception as e:
print(f"Error during email test: {e}")
import traceback
traceback.print_exc()