feat: git-based agent version reference and unified outdated badge (0.20.0)

SAC reads latest RDP/ssh-monitor versions from configured git repos for outdated detection, update targets, and settings test-git.
This commit is contained in:
2026-06-20 16:25:53 +10:00
parent d820d941c1
commit f411d8f070
22 changed files with 932 additions and 45 deletions
+24
View File
@@ -80,6 +80,30 @@ def db_session(db_engine):
session.close()
@pytest.fixture(autouse=True)
def mock_agent_git_release(monkeypatch):
"""API tests must not clone real git repos."""
from app.services.agent_git_release import GitReleaseVersions
empty = GitReleaseVersions(versions={}, fetched_at=None, from_cache=True)
monkeypatch.setattr(
"app.services.agent_git_release.get_git_release_versions",
lambda cfg, **kwargs: empty,
)
monkeypatch.setattr(
"app.api.v1.hosts.get_git_release_versions",
lambda cfg, **kwargs: empty,
)
monkeypatch.setattr(
"app.api.v1.settings.get_git_release_versions",
lambda cfg, **kwargs: empty,
)
monkeypatch.setattr(
"app.services.agent_update.get_git_release_versions",
lambda cfg, **kwargs: empty,
)
@pytest.fixture
def client(db_session, monkeypatch):
monkeypatch.setattr("app.main.bootstrap_api_key", lambda: None)