feat(worker): supervise VPN connections and recover batched telemetry
This commit is contained in:
@@ -36,6 +36,17 @@ def _endpoint(router: APIRouter, path: str, method: str) -> Callable[..., Any]:
|
||||
raise AssertionError(f"{method} {path} route is missing")
|
||||
|
||||
|
||||
def test_pipeline_only_snapshot_does_not_claim_host_metrics_or_zero_network(tmp_path):
|
||||
service = WorkerTelemetryService(WorkerProfileStore(tmp_path))
|
||||
probe = _probe()
|
||||
probe["raw"] = {"node_id": EXPECTED_NODE_ID, "observed_at_utc": "2026-07-27T12:00:00Z"}
|
||||
snapshot = service._telemetry_document(service.store.read(), probe, 1.0)
|
||||
assert snapshot["connection"]["reachable"] is True
|
||||
assert snapshot["connection"]["error_code"] == "telemetry-host-incomplete"
|
||||
assert snapshot["network"]["aggregate"] is None
|
||||
assert snapshot["node"]["memory"]["used_percent"] is None
|
||||
|
||||
|
||||
def _probe(
|
||||
*,
|
||||
node_id: str = EXPECTED_NODE_ID,
|
||||
|
||||
Reference in New Issue
Block a user