ifcurl/tests
Bruno Postle 335349db1a git.py: LRU disk cache eviction; service.py: configurable in-memory limits
Disk cache (bare repo clones under ~/.cache/ifcurl/):
- IFCURL_CACHE_MAX_GB env var sets the max total size; when exceeded after a
  new clone the oldest-accessed repos are removed until under the limit
- remote_url stored per clone entry so ifcurl cache list can show the URL
- _touch_cache() updates mtime on every repo open for LRU tracking

In-memory caches (service.py):
- _T2_MAX and _T3_MAX now read from IFCURL_T2_MAX / IFCURL_T3_MAX env vars
  (defaults: 8 IFC blobs, 64 selector results) — configurable without rebuild

New CLI:  ifcurl cache list | prune [--max-gb N] | clear

Tests: 6 new unit tests for _dir_size, _touch_cache, _repo_cache_entries,
_evict_if_needed. 118 → 124 passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 09:06:56 +01:00
..
conftest.py Authentication and test coverage 2026-04-15 23:21:13 +01:00
test_auth.py Authentication and test coverage 2026-04-15 23:21:13 +01:00
test_git.py git.py: LRU disk cache eviction; service.py: configurable in-memory limits 2026-04-24 09:06:56 +01:00
test_render.py Authentication and test coverage 2026-04-15 23:21:13 +01:00
test_service.py tests: extend coverage — SSRF protection, GET endpoint, LRU eviction, branch ref 2026-04-24 08:38:03 +01:00
test_url.py Fix port preservation and HTTP fallback for local Gitea 2026-04-15 23:50:54 +01:00
test_viewer_url.mjs viewer: extract URL logic to viewer-url.js, add JS tests 2026-04-24 07:31:19 +01:00