Add coverage reporting to inventory testing
Using the coverage report will show how much of the dynamic_inventory.py script is actually exercised by tests. As of this commit, there is no enforced coverage level, rather it is used for informational purposes only. In the future, an enforce coverage percentage would be a good idea. Change-Id: Ic2ccc9ae5f306465b6990d935c82f81bb7b7956a
This commit is contained in:
parent
d4940515b6
commit
559d2dc865
@ -1,6 +1,7 @@
|
||||
ansible>1.9,<2.0,!=1.9.6
|
||||
ansible-lint>=2.0.3,<=2.3.6
|
||||
bashate==0.5.0 # Apache-2.0
|
||||
coverage<=4.0.3 # Apache-2.0
|
||||
flake8==2.2.4
|
||||
hacking>=0.10.0,<0.11
|
||||
mccabe==0.2.1 # capped for flake8
|
||||
|
7
tox.ini
7
tox.ini
@ -89,8 +89,13 @@ commands =
|
||||
{toxinidir}/playbooks/*.yml"
|
||||
|
||||
[testenv:inventory]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
coverage
|
||||
commands =
|
||||
python {toxinidir}/tests/test_inventory.py
|
||||
coverage erase
|
||||
coverage run {toxinidir}/tests/test_inventory.py
|
||||
coverage report --include={toxinidir}/playbooks/inventory/*
|
||||
|
||||
[testenv:linters]
|
||||
commands =
|
||||
|
Loading…
Reference in New Issue
Block a user