0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00
posthog/ee/clickhouse/test/test_system_status.py
James Greenhill 492e8e25d1
Add events count to system status page (#6062)
* Add events count to system status page

* add events count for last month and month to date
2021-09-21 22:48:32 +00:00

18 lines
583 B
Python

from ee.clickhouse.system_status import system_status
def test_system_status(db):
results = list(system_status())
assert [row["key"] for row in results] == [
"clickhouse_alive",
"clickhouse_event_count",
"clickhouse_event_count_last_month",
"clickhouse_event_count_month_to_date",
"clickhouse_disk_0_free_space",
"clickhouse_disk_0_total_space",
"clickhouse_table_sizes",
"clickhouse_system_metrics",
]
assert len(results[-2]["subrows"]["rows"]) > 0
assert len(results[-1]["subrows"]["rows"]) > 0