Improve tox testing 17/65017/4
authorStamatis Katsaounis <mokats@intracom-telecom.com>
Mon, 12 Nov 2018 10:57:35 +0000 (12:57 +0200)
committerDan Xu <xudan16@huawei.com>
Wed, 14 Nov 2018 14:31:50 +0000 (14:31 +0000)
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 <mokats@intracom-telecom.com>
.gitignore
docs/index.rst
requirements.txt
test-requirements.txt
tox.ini

index deb12ca..153de93 100644 (file)
@@ -26,6 +26,8 @@ pip-log.txt
 .pytest_cache
 nosetests.xml
 unittest_results.log
+cover/
+coverage.xml
 
 # Translations
 *.mo
index 88523e3..a5e6a17 100644 (file)
@@ -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
index fb94da5..4d41a31 100644 (file)
@@ -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
index 2796798..97ed096 100644 (file)
@@ -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 922f7cb..280e359 100644 (file)
--- 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}