From 930ebc4af5c9895775443b9a0ab17a73dc35693c Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Mon, 12 Nov 2018 12:57:35 +0200 Subject: Improve tox testing This patch removes unused test requirements. In addition, it runs coverage together with unit tests by py.test. In addition, it adds sone docs links which were missing. Finally, it adds coverage reports to .gitignore file. Change-Id: I68e65781b17929c60fbb3f4c318b1366c35d185f Signed-off-by: Stamatis Katsaounis --- .gitignore | 2 ++ docs/index.rst | 3 +++ requirements.txt | 12 ++++++------ test-requirements.txt | 15 ++++++--------- tox.ini | 21 ++++++++++++++------- 5 files changed, 31 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index deb12ca5..153de939 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,8 @@ pip-log.txt .pytest_cache nosetests.xml unittest_results.log +cover/ +coverage.xml # Translations *.mo diff --git a/docs/index.rst b/docs/index.rst index 88523e3b..a5e6a17b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,7 +12,9 @@ Dovetail :numbered: :maxdepth: 1 + testing/user/certificationworkflow/ApplicationForm testing/user/certificationworkflow/index + testing/user/ovpaddendum/exemption-strict-API-validation testing/user/ovpaddendum/index testing/user/reviewerguide/index testing/user/systempreparation/index @@ -20,5 +22,6 @@ Dovetail testing/user/userguide/index testing/developer/testcaserequirements/index + testing/developer/testscope/index release/release-notes/index diff --git a/requirements.txt b/requirements.txt index fb94da5d..4d41a31a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,21 +1,21 @@ ansible==2.2.0 click==6.6 Jinja2==2.8 -keystoneauth1==2.12.3 -openstacksdk==0.9.5 +keystoneauth1==3.4.0 +openstacksdk==0.11.2 os-client-config==1.28.0 -osc-lib==1.1.0 +osc-lib==1.10.0 paramiko==1.18.0 pbr==2.0.0 python-cinderclient==1.9.0 python-glanceclient==2.5.0 python-hosts==0.4.1 -python-keystoneclient==3.5.1 +python-keystoneclient==3.8.0 python-novaclient==6.0.2 python-openstackclient==3.2.1 pytz==2016.7 -PyYAML==3.11 -requests==2.10.0 +PyYAML==3.12 +requests==2.18.0 six==1.10.0 stevedore==1.20.0 shade==1.22.2 diff --git a/test-requirements.txt b/test-requirements.txt index 2796798a..97ed0965 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,10 +1,7 @@ -coverage>=3.6 -pep8==1.5.7 -pyflakes==0.8.1 -flake8<3.0 -pytest -pykwalify -mock -testrepository -testscenarios +coverage>=4.0,!=4.4 # Apache-2.0 +flake8<3.0 # MIT +pytest # MIT +pytest-cov # MIT +yamllint +mock # BSD testtools diff --git a/tox.ini b/tox.ini index 922f7cb9..280e359c 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,13 @@ install_command = pip install -U {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - py.test --basetemp={envtmpdir} --ignore=cvp {posargs} + py.test \ + --basetemp={envtmpdir} \ + --cov=dovetail \ + --cov-report term-missing \ + --cov-report xml \ + --ignore=cvp \ + {posargs} setenv = VIRTUAL_ENV={envdir} HOME = {envtmpdir} @@ -24,14 +30,8 @@ whitelist_externals = wget echo [testenv:pep8] -deps = flake8 commands = flake8 {toxinidir} -[testenv:py27-cover] -commands = python setup.py testr --coverage \ - --omit='{toxinidir}/dovetail/tests*' \ - --testr-args='{posargs}' - [flake8] show-source = True ignore = E123,E125,H803,E722,W503 @@ -47,3 +47,10 @@ whitelist_externals = echo [testenv:docs-linkcheck] deps = -rdocs/requirements.txt commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck + +[testenv:yamllint] +basepython = python2.7 +files = + etc +commands = + yamllint -s {[testenv:yamllint]files} -- cgit 1.2.3-korg