]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/prometheus: add test cases and validation using tox
authorPaul Cuzner <pcuzner@redhat.com>
Tue, 19 Oct 2021 00:07:02 +0000 (13:07 +1300)
committerAvan Thakkar <athakkar@redhat.com>
Thu, 6 Jan 2022 09:51:54 +0000 (15:21 +0530)
commit19e2e8cb93fa6f95dc43ff07fdc5fd4da8a8f159
tree55e884317c9363384481dddc142cf0d7a85ed021
parent78df779cf5418c1b9a82be21defa2f41c7bf1dec
mgr/prometheus: add test cases and validation using tox

Focus all tests inside a tests directory, and use pytest/tox to
perform validation of the overall content. tox tests also use
promtool if available to provide rule checks and unittest runs.

In addition to these checks a validate_rules script provides the
format, and content checks against all rules - which is also
called via tox (but can be run independently too)

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
12 files changed:
monitoring/prometheus/alerts/ceph_default_alerts.yml
monitoring/prometheus/alerts/test_alerts.yml [deleted file]
monitoring/prometheus/tests/README.md [new file with mode: 0644]
monitoring/prometheus/tests/__init__.py [new file with mode: 0644]
monitoring/prometheus/tests/requirements.txt [new file with mode: 0644]
monitoring/prometheus/tests/settings.py [new file with mode: 0644]
monitoring/prometheus/tests/test_alerts.yml [new file with mode: 0644]
monitoring/prometheus/tests/test_syntax.py [new file with mode: 0755]
monitoring/prometheus/tests/test_unittests.py [new file with mode: 0644]
monitoring/prometheus/tests/tox.ini [new file with mode: 0644]
monitoring/prometheus/tests/utils.py [new file with mode: 0644]
monitoring/prometheus/tests/validate_rules.py [new file with mode: 0755]