fix: dashboard and hosts count SSH and RDP daily reports
analytics-a4: daily_reports_24h uses report.daily.*; sac-deploy enables timers Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -92,6 +92,20 @@ def test_dashboard_summary_top_and_problems_24h(client, db_session, jwt_headers)
|
||||
assert types["agent.heartbeat"] == 2
|
||||
|
||||
|
||||
def test_dashboard_daily_reports_24h_includes_ssh_and_rdp(client, db_session, jwt_headers):
|
||||
h_ssh = _host(db_session, "ssh-pilot")
|
||||
h_rdp = _host(db_session, "rdp-pilot")
|
||||
h_rdp.product = "rdp-login-monitor"
|
||||
now = datetime.now(timezone.utc)
|
||||
_event(db_session, h_ssh, "report.daily.ssh", received_at=now)
|
||||
_event(db_session, h_rdp, "report.daily.rdp", received_at=now)
|
||||
db_session.commit()
|
||||
|
||||
r = client.get("/api/v1/dashboards/summary", headers=jwt_headers)
|
||||
assert r.status_code == 200
|
||||
assert r.json()["daily_reports_24h"] == 2
|
||||
|
||||
|
||||
def test_dashboard_recent_events_ordered_by_received_at(client, db_session, jwt_headers):
|
||||
h = _host(db_session, "live-host")
|
||||
now = datetime.now(timezone.utc)
|
||||
|
||||
Reference in New Issue
Block a user