0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
posthog/ee/clickhouse/test/test_system_status.py
Eric Duong 46faa8fab2
refactor(FOSS): foss remove all ee dependencies from /posthog (#10319)
* refactor: foss move properties to /posthog

* refactor: move replication and materializtaion

* refactor: move file

* refactor: move test and journeys

* refactor: move breakdown props

* refactor: move query imports

* refactor: move more ee dependencies

* refactor: restore groupsjoinquery

* fix: errors

* refactor: no ee.clickhouse dependncies

* try import tasks

* refactor: move materialization

* refactor: change foss split for column optimizer

* run black

* fix: imports

* remove comment

* Update snapshots

* run black

* skip isort

* Update snapshots

* format

* more fixes

* refactor(FOSS): split out paths query code (#10378)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* refactor: split out paths query code

* refactor: more code splitting

* fix: types

* refactor(FOSS): Setup such that FOSS is deployable (#10352)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* fix import

* refactor: add snapshost

* subscription-import

* fix: safe import

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 17:24:03 -04:00

22 lines
744 B
Python

from posthog.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",
"last_event_ingested_timestamp",
"dead_letter_queue_size",
"dead_letter_queue_events_last_day",
"dead_letter_queue_ratio_ok",
]
assert len(results[6]["subrows"]["rows"]) > 0
assert len(results[7]["subrows"]["rows"]) > 0