121 lines
2.7 KiB
INI
121 lines
2.7 KiB
INI
# Tox (http://tox.testrun.org/) is a tool for running tests
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
# and then run "tox" from this directory.
|
|
|
|
[tox]
|
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic/
|
|
envlist =
|
|
rbac-py2-dj111
|
|
rbac-py3-{dj111,dj22}
|
|
|
|
authentic-py2-dj111-oldldap
|
|
authentic-py2-dj111-drf34
|
|
authentic-py3-dj111-drf34
|
|
authentic-py3-dj22-drf39
|
|
|
|
[tox:jenkins]
|
|
envlist =
|
|
pylint
|
|
|
|
rbac-py3-dj22
|
|
|
|
authentic-py2-dj111-drf34
|
|
authentic-py3-dj111-drf34
|
|
authentic-py3-dj22-drf39
|
|
|
|
[testenv]
|
|
whitelist_externals =
|
|
/bin/mv
|
|
setenv =
|
|
|
|
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
|
|
|
|
authentic: DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
rbac: DJANGO_SETTINGS_MODULE=django_rbac.test_settings
|
|
|
|
authentic: TESTS=tests/
|
|
authentic-oldldap: TESTS=tests/test_ldap.py
|
|
rbac: TESTS=tests_rbac/
|
|
|
|
DB_ENGINE=django.db.backends.postgresql_psycopg2
|
|
|
|
JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml}
|
|
COVERAGE={tty::--cov=src --cov-branch --cov-append --cov-report xml --cov-report html}
|
|
fast: FAST=--nomigrations
|
|
reusedb: REUSEDB=--reuse-db
|
|
|
|
passenv=
|
|
BRANCH_NAME
|
|
# support for pg_virtualenv
|
|
PGPORT
|
|
PGHOST
|
|
PGUSER
|
|
PGPASSWORD
|
|
usedevelop = true
|
|
deps =
|
|
pip > 9
|
|
dj111: django<2.0
|
|
dj22: django<2.3
|
|
django-tables<2.0
|
|
psycopg2-binary
|
|
coverage
|
|
pytest-cov
|
|
pytest-django<3.4.6
|
|
pytest-random
|
|
mock
|
|
pytest<5
|
|
lxml
|
|
cssselect
|
|
django-webtest<1.9.3
|
|
Markdown<3
|
|
WebTest
|
|
pyquery
|
|
httmock
|
|
pytz
|
|
pytest-freezegun
|
|
enum34<=1.1.6
|
|
ldaptools>=0.15
|
|
oldldap: python-ldap<3
|
|
py2: django-appconf<1.0.4
|
|
py2: django-filter<2
|
|
drf34: djangorestframework>=3.4,<3.5
|
|
drf39: djangorestframework>=3.9.2,<3.10
|
|
commands =
|
|
py2: ./getlasso.sh
|
|
py3: ./getlasso3.sh
|
|
rbac,authentic: py.test {env:FAST:} {env:REUSEDB:} {env:COVERAGE:} {env:JUNIT:} {tty:--sw:} {posargs:{env:TESTS} --random-group}
|
|
|
|
[testenv:pylint]
|
|
basepython = python2.7
|
|
deps =
|
|
pylint<1.8
|
|
pylint-django<0.8.1
|
|
commands =
|
|
/bin/bash -c "./pylint.sh src/*/"
|
|
|
|
[testenv:manage]
|
|
usedevelop = True
|
|
setenv =
|
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
AUTHENTIC2_SETTINGS_FILE=local_settings.py
|
|
deps =
|
|
psycopg2-binary
|
|
django-debug-toolbar
|
|
ipython
|
|
ipdb
|
|
commands =
|
|
./getlasso3.sh
|
|
python3 ./authentic2-ctl {posargs:--help}
|
|
|
|
[pytest]
|
|
filterwarnings =
|
|
error
|
|
# there is nothing we can do about that
|
|
ignore:defusedxml.lxml is no longer supported:DeprecationWarning:openpyxl.xml.functions
|
|
ignore:Using or importing the ABCs from 'collections':DeprecationWarning:django.*
|
|
ignore:Role QuerySet won't use Meta.ordering::django\..*
|
|
# remind us later
|
|
once:.*staticfiles.*::django\..*
|
|
junit_family=xunit2
|