add more stats and fix

This commit is contained in:
larssand
2026-06-30 12:23:23 +02:00
parent 4af316c739
commit e144cd8258
4 changed files with 29 additions and 5 deletions

View File

@@ -46,7 +46,7 @@ class GraylogAggregateTests(unittest.TestCase):
self.assertEqual(len(client.arguments), 2)
def test_uses_tool_schema_to_avoid_unsupported_fields(self):
schema = {"properties": {"query": {}, "streams": {}, "range_seconds": {}, "series": {}}}
schema = {"properties": {"query": {}, "streams": {}, "range_seconds": {}, "metrics": {}, "groupings": {}}}
client = _AggregateClient([
{"result": {"content": [{"type": "text", "text": '{"schema":[{"name":"count"}],"datarows":[[7]]}'}]}}
], schema=schema)
@@ -54,7 +54,8 @@ class GraylogAggregateTests(unittest.TestCase):
status = GraylogAggregateSource(client, "firewall").fetch_count()
self.assertEqual(status["aggregate_events"], 7)
self.assertIn("series", client.arguments[0])
self.assertIn("metrics", client.arguments[0])
self.assertIn("groupings", client.arguments[0])
self.assertNotIn("group_by", client.arguments[0])