mirror of https://github.com/ceph/ceph
70 lines
1.7 KiB
INI
70 lines
1.7 KiB
INI
|
[tox]
|
||
|
envlist = lint,jsonnet-{check,lint,fix},promql-query-{test,lint},alerts-check
|
||
|
skipsdist = true
|
||
|
|
||
|
[testenv:jsonnet-bundler-{install,update}]
|
||
|
whitelist_externals =
|
||
|
jb
|
||
|
description =
|
||
|
install: Install the jsonnet dependencies
|
||
|
update: Update the jsonnet dependencies
|
||
|
commands =
|
||
|
install: jb install
|
||
|
update: jb update
|
||
|
|
||
|
[testenv:jsonnet-{check,fix,lint}]
|
||
|
basepython = python3
|
||
|
whitelist_externals =
|
||
|
find
|
||
|
jb
|
||
|
jsonnet
|
||
|
jsonnetfm
|
||
|
sh
|
||
|
description =
|
||
|
check: Ensure that auto-generated files matches the current version
|
||
|
fix: Update generated files from jsonnet filse with latest changes
|
||
|
lint: Test if jsonnet files are linted (without any update)
|
||
|
deps =
|
||
|
-rrequirements-grafonnet.txt
|
||
|
depends = jsonnet-bundler-install
|
||
|
commands =
|
||
|
check: sh test-jsonnet.sh
|
||
|
lint: ./lint-jsonnet.sh --test
|
||
|
fix: jsonnet -J vendor -m dashboards_out dashboards.jsonnet
|
||
|
|
||
|
[testenv:lint]
|
||
|
description =
|
||
|
Run python linters
|
||
|
deps =
|
||
|
-rrequirements-lint.txt
|
||
|
setenv =
|
||
|
commands =
|
||
|
pylint --rcfile=.pylintrc tests_dashboards
|
||
|
mypy tests_dashboards
|
||
|
isort tests_dashboards
|
||
|
|
||
|
[testenv:promql-query-test]
|
||
|
description =
|
||
|
lint: Run promtool check on grafana queries
|
||
|
test: Run promtool unit testing on grafana queries.
|
||
|
deps =
|
||
|
-rrequirements-lint.txt
|
||
|
depends = grafonnet-check
|
||
|
setenv =
|
||
|
whitelist_externals =
|
||
|
promtool
|
||
|
commands =
|
||
|
behave tests_dashboards/features
|
||
|
|
||
|
[testenv:alerts-{check,lint}]
|
||
|
deps =
|
||
|
-rrequirements-alerts.txt
|
||
|
pytest
|
||
|
depends = grafonnet-check
|
||
|
whitelist_externals =
|
||
|
promtool
|
||
|
commands =
|
||
|
lint: promtool check rules prometheus_alerts.yaml
|
||
|
test: pytest -rA tests_alerts/test_syntax.py tests_alerts/test_unittests.py
|
||
|
python3 ./tests_alerts/validate_rules.py
|