fix: refresh optional CLI Apps catalogs
maintainer edit: CLI Apps settings now treats optional catalog caches as refresh candidates without blocking the initial payload, and pending polling stops when refresh is throttled instead of running indefinitely.
This commit is contained in:
1 parent
2216405821
commit
dd2cb4ca91
5 files changed
+95
-13
No files matched your search
@@ -286,6 +286,21 @@ def test_payload_cache_only_does_not_fetch_catalog(tmp_path: Path, monkeypatch:
|
||||
assert manager.catalog_cache_fresh() is True
|
||||
|
||||
|
||||
def test_catalog_cache_fresh_can_include_optional_sources(tmp_path: Path) -> None:
|
||||
manager = _manager(tmp_path)
|
||||
_write_cache(
|
||||
manager._cache_path("harness"),
|
||||
{"meta": {"updated": "2026-04-16"}, "clis": []},
|
||||
)
|
||||
_write_cache(
|
||||
manager._cache_path("public"),
|
||||
{"meta": {"updated": "2026-04-18"}, "clis": []},
|
||||
)
|
||||
|
||||
assert manager.catalog_cache_fresh() is True
|
||||
assert manager.catalog_cache_fresh(include_optional=True) is False
|
||||
|
||||
|
||||
def test_payload_cache_only_without_cache_returns_empty(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
manager = _manager(tmp_path)
|
||||
|
||||
|
||||
Reference in new issue
Block a user