Update Keystone tempest plugin to 0.2.0
[functest.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,ansiblelint,bashate,bandit,py27,py36,cover,perm
3
4 [testenv]
5 pip_version = pip==20.2.4
6 usedevelop = True
7 deps =
8   -c{toxinidir}/upper-constraints.txt
9   -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/rocky/upper-constraints.txt}
10   -r{toxinidir}/requirements.txt
11   -r{toxinidir}/test-requirements.txt
12 install_command = pip install {opts} {packages}
13 commands = nosetests --with-xunit \
14   --with-coverage \
15   --cover-tests \
16   --cover-package=functest \
17   --cover-xml \
18   --cover-html \
19   functest/tests/unit
20
21 [testenv:docs]
22 basepython = python2.7
23 commands =
24   doc8 \
25     --ignore-path api/build \
26     --ignore-path docs/build \
27     --ignore-path docs/_build \
28     api \
29     docs
30   sphinx-build -W -b html api/ api/build
31   sphinx-build -W -n -b html docs docs/build/html
32   sphinx-build -W -n -b linkcheck docs docs/_build/linkcheck
33   sphinx-build -W -n -b html -c docs/lfreleng docs docs/_build/html
34   sphinx-build -W -b spelling -Dextensions=sphinxcontrib.spelling docs docs/_build/spellcheck
35
36 [testenv:pep8]
37 basepython = python2.7
38 commands = flake8
39
40 [testenv:pylint]
41 basepython = python2.7
42 commands =
43   pylint \
44     --ignore-imports=y --min-similarity-lines=10 \
45     --disable=locally-disabled,super-on-old-class functest
46
47 [testenv:yamllint]
48 basepython = python2.7
49 files =
50   .travis.yml
51   docker
52   functest/ci
53   functest/opnfv_tests/openstack/rally/blacklist.yaml
54   functest/opnfv_tests/openstack/rally/rally_jobs.yaml
55   functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.yaml
56   functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml
57   functest/opnfv_tests/vnf
58 commands =
59   yamllint -s {[testenv:yamllint]files}
60
61 [testenv:ansiblelint]
62 basepython = python2.7
63 commands =
64   ansible-lint -x303 ansible/site.yml
65
66 [testenv:py36]
67 commands = nosetests functest/tests/unit
68
69 [testenv:bashate]
70 basepython = python2.7
71 files =
72   functest/opnfv_tests/openstack/cinder/write_data.sh
73   functest/opnfv_tests/openstack/cinder/read_data.sh
74   functest/ci/add_proxy.sh
75   functest/ci/convert_images.sh
76   functest/ci/download_images.sh
77   build.sh
78 commands = bashate -e E005,E006,E042,E043 {[testenv:bashate]files}
79
80
81 [testenv:bandit]
82 basepython = python2.7
83 commands = bandit -r functest -x tests -n 5 -ll -s B601,B602
84
85 [testenv:cover]
86 basepython = python2.7
87 dirs =
88   functest/tests/unit/odl
89   functest/tests/unit/openstack/vping
90   functest/tests/unit/openstack/cinder
91 commands = nosetests --with-coverage --cover-tests \
92   --cover-package functest.opnfv_tests.sdn.odl \
93   --cover-package functest.opnfv_tests.openstack.vping.vping_ssh \
94   --cover-package functest.opnfv_tests.openstack.cinder.cinder_test \
95   --cover-package functest.tests.unit \
96   --cover-min-percentage 100 {[testenv:cover]dirs}
97
98 [testenv:perm]
99 basepython = python2.7
100 whitelist_externals = bash
101 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*'
102 commands =
103   bash -c "\
104     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
105     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
106   bash -c "\
107     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"