add more stats and fix
This commit is contained in:
@@ -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])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user