M8-R11: make business timezone deterministic
frontend / frontend (push) Successful in 46s
pytest / test (push) Successful in 3m56s

This commit is contained in:
2026-08-27 12:16:52 +02:00
parent d5623b9fcb
commit 33ca3da593
6 changed files with 65 additions and 10 deletions
+15
View File
@@ -72,6 +72,21 @@ def test_compose_uses_migration_job_before_app() -> None:
assert dev["services"]["app"]["build"] == "."
def test_compose_defaults_business_timezone_and_dev_inherits_it() -> None:
"""Both production services receive an overridable Amsterdam timezone.
Compose merges service ``environment`` mappings, and the dev override does
not replace either mapping, so the base default applies to base+dev too.
"""
base = _read_yaml("docker-compose.yml")
dev = _read_yaml("docker-compose.dev.yml")
default_tz = "${TZ:-Europe/Amsterdam}"
for service_name in ("migration", "app"):
assert base["services"][service_name]["environment"]["TZ"] == default_tz
assert "TZ" not in dev["services"].get(service_name, {}).get("environment", {})
def test_compose_keeps_app_non_root_and_maps_minimal_warmtelink_serial_access() -> None:
"""Base Compose maps the configured device with only pyserial's required access.