Publish curated ITWorx_MCP_Hub source from 6c7434368ce2a594005983c5a6601a31a639e7f1
This commit is contained in:
1 parent
77946d62c4
commit
6d40ab975c
86 files changed
+6784
-1478
No files matched your search
@@ -237,24 +237,20 @@ def test_dashboard_drift_is_measured_against_managed_connector_gateways(
|
||||
assert "connector gateway drift" in drift["detail"].lower()
|
||||
|
||||
|
||||
def test_dashboard_project_and_connector_health_matches_resource_list_not_hardcoded_unknown(
|
||||
def test_dashboard_distinguishes_registration_from_connector_readiness(
|
||||
viewer_client: TestClient,
|
||||
) -> None:
|
||||
"""The dashboard overview used to hardcode "unknown" for every project
|
||||
and connector regardless of catalog state, while the /api/resource
|
||||
list endpoint (GET /api/projects, /api/connectors) already computed a
|
||||
real "healthy"/"unknown" signal from catalog registration validity --
|
||||
the two surfaces visually disagreed. Both now share
|
||||
_catalog_registration_health(); this proves the dashboard reflects it
|
||||
too, not just the resource list.
|
||||
"""
|
||||
"""A valid registration is not evidence that a connector route is live."""
|
||||
dashboard = viewer_client.get("/api/dashboard")
|
||||
assert dashboard.status_code == 200
|
||||
body = dashboard.json()
|
||||
assert body["projects"], "expected at least one registered project in the test catalog"
|
||||
assert body["connectors"], "expected at least one registered connector in the test catalog"
|
||||
assert all(item["health"] == "healthy" for item in body["projects"])
|
||||
assert all(item["state"] == "healthy" for item in body["connectors"])
|
||||
assert all(item["state"] == "unknown" for item in body["connectors"])
|
||||
assert all(item["registrationState"] == "registered" for item in body["connectors"])
|
||||
assert all(item["readiness"]["source"] == "not-probed" for item in body["connectors"])
|
||||
assert all(item["readiness"]["observedAt"] is None for item in body["connectors"])
|
||||
|
||||
projects_list = viewer_client.get("/api/projects")
|
||||
assert projects_list.status_code == 200
|
||||
|
||||
Reference in new issue
Block a user