fix: improve error logging for invalid policy entries and adjust test configuration

This commit is contained in:
Lloyd
2026-06-05 16:23:18 +01:00
parent e9a9f21cab
commit da95c67cef
2 changed files with 7 additions and 4 deletions
+5 -1
View File
@@ -441,7 +441,11 @@ class APIEndpoints:
continue
try:
entry_value = self._normalize_policy_entry_value(kind, entry.get("value"))
except Exception:
except Exception as exc:
logger.warning(
"Skipping invalid policy entry at index %d: %s", ent_idx, exc
)
continue
entry_id = self._slugify_policy_id(
+2 -3
View File
@@ -16,7 +16,6 @@ import yaml
from repeater.web.api_endpoints import APIEndpoints
# Minimal initial config.yaml the wizard writes into.
_BASE_CONFIG = {
"repeater": {"node_name": "mesh-repeater-01", "security": {"admin_password": "admin123"}},
@@ -66,11 +65,11 @@ def wizard_env(tmp_path, monkeypatch):
# config has no explicit storage_dir set — that's exactly what we want
# so the wizard finds our radio-settings.json next to config.yaml.
config = {
"storage_dir": str(tmp_path),
"repeater": {
"storage_dir": str(tmp_path),
"node_name": "mesh-repeater-01",
"security": {"admin_password": "admin123"},
}
},
}
endpoints = APIEndpoints(config=config, config_path=str(config_path))