* Add unit testing
* Fix code according to CI
This includes:
- formating changes
- rewording of some doc strings
- adding support to {label!~'value'} in rbac
* Add unit tests automation
* Fix CI automation
* Add requirements.txt
48 lines
978 B
INI
48 lines
978 B
INI
[tox]
|
|
minversion = 4.2.5
|
|
envlist = py38,py39,py311,pep8
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OBSERVABILITY_CLIENT_EXEC_DIR={envdir}/bin
|
|
passenv =
|
|
PROMETHEUS_*
|
|
OBSERVABILITY_*
|
|
deps = .[test]
|
|
pytest
|
|
commands = pytest {posargs:observabilityclient/tests}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps = flake8
|
|
flake8-blind-except
|
|
flake8-builtins
|
|
flake8-docstrings
|
|
flake8-logging-format
|
|
hacking<3.1.0,>=3.0
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
deps = .[test,doc]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
deps = {[testenv]deps}
|
|
pytest-cov
|
|
commands = observabilityclient {posargs:observabilityclient/tests}
|
|
|
|
[flake8]
|
|
show-source = True
|
|
ignore = D100,D101,D102,D103,D104,D105,D106,D107,A002,A003,W504,W503
|
|
exclude=.git,.tox,dist,doc,*egg,build
|
|
enable-extensions=G
|
|
application-import-names = observabilityclient
|
|
|
|
[pytest]
|
|
addopts = --verbose
|
|
norecursedirs = .tox
|