Add backend capability cache reset helper for jail service tests
This commit is contained in:
@@ -248,6 +248,18 @@ async def _check_backend_cmd_supported(
|
||||
return _backend_cmd_supported
|
||||
|
||||
|
||||
async def _reset_backend_capability_cache() -> None:
|
||||
"""Reset the cached backend/idle capability detection state.
|
||||
|
||||
This helper is intended for test isolation and for any scenario where the
|
||||
cached probe result must be invalidated before the next detection attempt.
|
||||
"""
|
||||
global _backend_cmd_supported
|
||||
|
||||
async with _backend_cmd_lock:
|
||||
_backend_cmd_supported = None
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Public API — Jail listing & detail
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user