
Our usage of the sha1 method is only to hash the contents of files so we don't store a single file more than once. We can likely use something more "secure" but let's temporarily disable this check for now. Change-Id: Ie7b07e489e6c442f34fc9930713b9dfdfa530aaf
71 lines
1.9 KiB
INI
71 lines
1.9 KiB
INI
[tox]
|
||
minversion = 2.0
|
||
envlist = py35,pep8
|
||
skipdist = True
|
||
|
||
[testenv]
|
||
basepython = python3
|
||
sitepackages = False
|
||
usedevelop = True
|
||
install_command = pip install -U {opts} {packages} -c{env:CONSTRAINTS_FILE:/dev/null}
|
||
setenv = VIRTUAL_ENV={envdir}
|
||
deps = -r{toxinidir}/test-requirements.txt
|
||
|
||
[testenv:venv]
|
||
commands = {posargs}
|
||
|
||
[testenv:docs]
|
||
commands = sphinx-build -W -b html doc/source doc/build/html
|
||
|
||
[testenv:pep8]
|
||
# B303 - Use of insecure MD2, MD4, or MD5 hash function.
|
||
# We're using sha1 to generate a hash of file contents.
|
||
commands =
|
||
flake8 ara hacking
|
||
bandit -r ara --skip B303
|
||
|
||
[testenv:py35]
|
||
commands = python manage.py test ara
|
||
|
||
[testenv:runserver]
|
||
commands =
|
||
python manage.py migrate
|
||
python manage.py collectstatic --clear --no-input
|
||
python manage.py runserver
|
||
setenv =
|
||
DJANGO_DEBUG=1
|
||
|
||
# Temporary venv to help bootstrap integration
|
||
[testenv:ansible-integration]
|
||
deps =
|
||
git+https://git.openstack.org/openstack/ara-plugins@master#egg=ara-plugins
|
||
git+https://git.openstack.org/openstack/ara-clients@master#egg=ara-clients
|
||
commands =
|
||
rm -f {toxinidir}/db.sqlite3
|
||
bash -c 'ANSIBLE_CALLBACK_PLUGINS=$(python -c "import os,ara.plugins; print(os.path.dirname(ara.plugins.__file__))")/callback ansible-playbook {toxinidir}/hacking/test-playbook.yml'
|
||
python {toxinidir}/hacking/validate.py
|
||
setenv =
|
||
DJANGO_DEBUG=1
|
||
DJANGO_LOG_LEVEL=DEBUG
|
||
whitelist_externals =
|
||
rm
|
||
bash
|
||
|
||
[testenv:cover]
|
||
commands =
|
||
coverage erase
|
||
coverage run {toxinidir}/manage.py test ara/server
|
||
coverage run -a {toxinidir}/manage.py test ara/api
|
||
coverage html
|
||
|
||
[flake8]
|
||
# E123, E125 skipped as they are invalid PEP-8.
|
||
# E741, short ambiguous variable names
|
||
# H106 Don’t put vim configuration in source files
|
||
# H203 Use assertIs(Not)None to check for None
|
||
max-line-length = 120
|
||
ignore = E123,E125,E741
|
||
enable-extensions=H106,H203
|
||
show-source = True
|
||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ara/api/migrations
|