fix(runtime): keep shared artifacts optional
This commit is contained in:
@@ -57,7 +57,11 @@ def test_runtime_readiness_reports_shared_store_and_bounded_cache(
|
||||
assert document["status"] == "ok"
|
||||
assert document["readiness"] == {
|
||||
"operational": True,
|
||||
"production_shared_artifacts": True,
|
||||
"optional_shared_artifacts": {
|
||||
"required": False,
|
||||
"configured": True,
|
||||
"ready": True,
|
||||
},
|
||||
}
|
||||
components = document["components"]
|
||||
assert isinstance(components, dict)
|
||||
@@ -85,16 +89,47 @@ def test_runtime_readiness_exposes_offline_cache_only_mode(
|
||||
document = _document(tmp_path, gateway=gateway, reconciler=reconciler)
|
||||
|
||||
assert document["ok"] is True
|
||||
assert document["status"] == "degraded"
|
||||
assert document["status"] == "ok"
|
||||
assert document["readiness"] == {
|
||||
"operational": True,
|
||||
"production_shared_artifacts": False,
|
||||
"optional_shared_artifacts": {
|
||||
"required": False,
|
||||
"configured": True,
|
||||
"ready": False,
|
||||
},
|
||||
}
|
||||
components = document["components"]
|
||||
assert isinstance(components, dict)
|
||||
assert components["artifact_store"]["status"] == "offline-cache-only"
|
||||
|
||||
|
||||
def test_runtime_readiness_treats_standalone_as_complete_local_contour(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
reconciler = BackgroundReconcilerReadiness()
|
||||
reconciler.record_success()
|
||||
|
||||
document = _document(tmp_path, gateway=None, reconciler=reconciler)
|
||||
|
||||
assert document["ok"] is True
|
||||
assert document["status"] == "ok"
|
||||
assert document["readiness"] == {
|
||||
"operational": True,
|
||||
"optional_shared_artifacts": {
|
||||
"required": False,
|
||||
"configured": False,
|
||||
"ready": False,
|
||||
},
|
||||
}
|
||||
components = document["components"]
|
||||
assert isinstance(components, dict)
|
||||
assert components["artifact_store"] == {
|
||||
"mode": "standalone",
|
||||
"status": "not-configured",
|
||||
"central_available": None,
|
||||
}
|
||||
|
||||
|
||||
def test_runtime_readiness_fails_after_repeated_reconciler_errors(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user