feat(trip-cluster): config, factory, CLI skeleton, health + thumb proxy

This commit is contained in:
2026-06-27 17:19:06 +02:00
parent 9ec6512428
commit e01b30a5b5
9 changed files with 196 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import os
import pytest
from app.config import load_config, ConfigError
def test_missing_required_raises():
with pytest.raises(ConfigError) as e:
load_config({"IMMICH_URL": "http://x"})
assert "IMMICH_API_KEY" in e.value.missing
def test_anthropic_optional_and_paths(tmp_path):
cfg = load_config({"IMMICH_URL": "http://x/", "IMMICH_API_KEY": "k",
"DATA_DIR": str(tmp_path)})
assert cfg.immich_url == "http://x" # trailing slash stripped
assert cfg.anthropic_api_key == "" # optional in M1
assert cfg.db_path == os.path.join(str(tmp_path), "trip-cluster.db")
assert cfg.thumbs_dir == os.path.join(str(tmp_path), "thumbs")