Add server dbpurgeage warning state in API and mark task complete
This commit is contained in:
@@ -63,6 +63,16 @@ class TestGetSettings:
|
||||
assert result.settings.log_target == "/var/log/fail2ban.log"
|
||||
assert result.settings.db_purge_age == 86400
|
||||
assert result.settings.db_max_matches == 10
|
||||
assert result.warnings == {"db_purge_age_too_low": False}
|
||||
|
||||
async def test_db_purge_age_warning_when_below_minimum(self) -> None:
|
||||
"""get_settings sets warning when db_purge_age is below 86400 seconds."""
|
||||
responses = {**_DEFAULT_RESPONSES, "get|dbpurgeage": (0, 3600)}
|
||||
with _patch_client(responses):
|
||||
result = await server_service.get_settings(_SOCKET)
|
||||
|
||||
assert result.settings.db_purge_age == 3600
|
||||
assert result.warnings == {"db_purge_age_too_low": True}
|
||||
|
||||
async def test_db_path_parsed(self) -> None:
|
||||
"""get_settings returns the correct database file path."""
|
||||
|
||||
Reference in New Issue
Block a user