]> 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)
committerPaul Cuzner <pcuzner@redhat.com>
Fri, 22 Oct 2021 00:36:40 +0000 (13:36 +1300)
commit4750ac0d7766a8a089adf073415af0ac0d3f81d9
treefd36b18717c0fa46d1a90ba94762749d3b83b6d1
parente0dfc02063ef40cf6a1dc6e3080d0a856ceff050
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]