Some additional checks and cleanup
Build LinkLog Development Image / development-image (push) Successful in 10s

This commit is contained in:
2026-08-26 20:35:06 +02:00
parent b03a241be2
commit 018c02c759
6 changed files with 63 additions and 12 deletions
+18
View File
@@ -0,0 +1,18 @@
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
def test_production_compose_configuration_matches_settings_environment_keys():
compose = (ROOT / 'docker-compose.yml').read_text()
settings = (ROOT / 'backend' / 'app' / 'core' / 'config.py').read_text()
database = (ROOT / 'backend' / 'app' / 'database.py').read_text()
compose_keys = set(re.findall(r'\b(LINKLOG_[A-Z0-9_]+):', compose))
settings_keys = set(re.findall(r"os\.getenv\('([^']+)'", settings + database))
assert {'LINKLOG_TOKEN_EXPIRY_MINUTES', 'LINKLOG_REFRESH_TOKEN_EXPIRY_DAYS'} <= compose_keys
assert compose_keys & settings_keys == compose_keys
assert 'LINKLOG_TOKEN_EXPIRY_DAYS' not in compose_keys