mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-07-26 11:33:12 +02:00
a64d0b5561
Add 49 targeted tests across 8 files to lift patch coverage from 76.9% to ~95%+: - collector/cli.py (3% -> covered): TestImportRoutes (12 tests for _import_routes: happy-path, upsert, all error branches, exception handler) + TestRouteSeedImport (seed command integration). - api/routes/routes.py: update_route all-field branch, duplicate-label 409, observer sync, unresolved-nodes 400, hidden-route 404, get_route contributing-observers, create with observers, preview guards, history retention clamp. - collector/routes.py: evaluate_all_routes exception handler, preview early-return guards, evaluate_route_history < 2 expected, limit/until/ observer params on fetch_candidate_paths, _route_expected_hashes derive branch, _has_any_hops_per_day empty guard. - collector/subscriber.py: TestRouteEvaluatorScheduler (disabled, runs-and-stops, error-is-logged) mirroring TestSpamRescoreScheduler. - common/schemas/routes.py: RouteUpdate + RoutePreviewRequest validators (min nodes, distinct, clear_threshold). - collector/route_evaluator.py: evaluation exception handler. - common/config.py: route_evaluator_interval_seconds default + custom. - api/routes/packet_groups.py: mixed-visibility representative selection.