fix(telemetry): recover worker agent and Tailscale transport automatically
This commit is contained in:
@@ -144,3 +144,17 @@ def test_contour_router_returns_404_for_unknown_contour(tmp_path: Path) -> None:
|
||||
with pytest.raises(HTTPException) as error:
|
||||
install("missing")
|
||||
assert error.value.status_code == 404
|
||||
|
||||
|
||||
def test_broker_apply_uses_explicit_installation_root(tmp_path, monkeypatch):
|
||||
from k1link.web import compute_contour_api as api
|
||||
root = tmp_path / 'prepared-stack'
|
||||
monkeypatch.setenv('MISSIONCORE_TELEMETRY_PLANE_ROOT', str(root))
|
||||
seen = []
|
||||
def apply(target, installation):
|
||||
seen.append(installation)
|
||||
return {'ready': True}
|
||||
monkeypatch.setattr(api, 'apply_broker_network', apply)
|
||||
router = api.build_compute_contour_router(root_provider=lambda: tmp_path / 'system')
|
||||
_endpoint(router, '/api/v1/system/contours/{contour_id}/network/broker', 'POST')('worker-006')
|
||||
assert seen == [root]
|
||||
|
||||
Reference in New Issue
Block a user