2014-11-22 06:23:50 +01:00
|
|
|
# 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]
|
2019-03-14 20:40:20 +01:00
|
|
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic/
|
2020-04-22 14:46:01 +02:00
|
|
|
envlist =
|
2021-03-30 10:10:04 +02:00
|
|
|
code-style
|
2020-09-25 17:35:11 +02:00
|
|
|
authentic-py3-dj111-drf39
|
2021-02-18 10:52:04 +01:00
|
|
|
authentic-py3-dj22-drf39
|
2020-04-22 14:46:01 +02:00
|
|
|
|
|
|
|
[tox:jenkins]
|
|
|
|
envlist =
|
|
|
|
pylint
|
|
|
|
|
2020-09-25 17:35:11 +02:00
|
|
|
rbac-py3-dj111
|
2020-04-22 14:46:01 +02:00
|
|
|
rbac-py3-dj22
|
|
|
|
authentic-py3-dj111-drf34
|
2020-09-25 17:35:11 +02:00
|
|
|
authentic-py3-dj111-drf39
|
2020-04-22 14:46:01 +02:00
|
|
|
authentic-py3-dj22-drf39
|
2014-11-22 06:23:50 +01:00
|
|
|
|
2016-02-12 10:46:35 +01:00
|
|
|
[testenv]
|
2015-09-22 22:40:36 +02:00
|
|
|
setenv =
|
2020-04-22 14:46:01 +02:00
|
|
|
|
2020-05-11 23:53:40 +02:00
|
|
|
authentic: AUTHENTIC2_SETTINGS_FILE=tests/settings.py
|
2016-03-02 01:13:55 +01:00
|
|
|
authentic: DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
|
|
rbac: DJANGO_SETTINGS_MODULE=django_rbac.test_settings
|
2019-05-10 10:22:42 +02:00
|
|
|
|
|
|
|
authentic: TESTS=tests/
|
|
|
|
authentic-oldldap: TESTS=tests/test_ldap.py
|
|
|
|
rbac: TESTS=tests_rbac/
|
|
|
|
|
2020-04-22 14:46:01 +02:00
|
|
|
DB_ENGINE=django.db.backends.postgresql_psycopg2
|
2020-09-01 14:20:00 +02:00
|
|
|
SETUPTOOLS_USE_DISTUTILS=stdlib
|
2019-05-10 10:22:42 +02:00
|
|
|
|
|
|
|
JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml}
|
2020-09-25 18:34:15 +02:00
|
|
|
COVERAGE={tty::--cov --cov-append --cov-report xml --cov-report html --cov-config=tox.ini}
|
2016-04-26 00:42:49 +02:00
|
|
|
fast: FAST=--nomigrations
|
2018-07-01 15:26:01 +02:00
|
|
|
reusedb: REUSEDB=--reuse-db
|
2020-05-17 11:04:51 +02:00
|
|
|
!nosw: SW={tty:--sw:}
|
2020-10-01 11:49:10 +02:00
|
|
|
slow: PYTESTOPTIONS={env:PYTESTOPTIONS:} --slow
|
2020-04-22 14:46:01 +02:00
|
|
|
passenv=
|
|
|
|
BRANCH_NAME
|
2019-05-10 10:22:42 +02:00
|
|
|
# support for pg_virtualenv
|
2020-04-22 14:46:01 +02:00
|
|
|
PGPORT
|
|
|
|
PGHOST
|
|
|
|
PGUSER
|
|
|
|
PGPASSWORD
|
2020-10-01 11:49:10 +02:00
|
|
|
PYTESTOPTIONS
|
2016-03-02 01:13:55 +01:00
|
|
|
deps =
|
2017-10-13 12:46:45 +02:00
|
|
|
pip > 9
|
2018-07-17 17:21:09 +02:00
|
|
|
dj111: django<2.0
|
2020-04-22 14:46:01 +02:00
|
|
|
dj22: django<2.3
|
|
|
|
django-tables<2.0
|
|
|
|
psycopg2-binary
|
2015-09-22 22:40:36 +02:00
|
|
|
coverage
|
|
|
|
pytest-cov
|
2020-09-28 15:04:45 +02:00
|
|
|
pytest-django
|
2018-03-23 15:45:47 +01:00
|
|
|
pytest-random
|
2020-10-06 09:29:44 +02:00
|
|
|
mock<4
|
2020-09-28 15:04:45 +02:00
|
|
|
pytest!=5.3.3
|
2015-09-22 22:40:36 +02:00
|
|
|
lxml
|
|
|
|
cssselect
|
2020-06-20 16:28:26 +02:00
|
|
|
django-webtest
|
2018-09-23 08:58:39 +02:00
|
|
|
Markdown<3
|
2015-11-10 10:32:00 +01:00
|
|
|
WebTest
|
2015-12-14 14:45:59 +01:00
|
|
|
pyquery
|
2016-06-16 11:50:24 +02:00
|
|
|
httmock
|
2016-11-02 16:43:52 +01:00
|
|
|
pytz
|
2018-08-03 17:12:30 +02:00
|
|
|
pytest-freezegun
|
2020-10-01 11:49:10 +02:00
|
|
|
faker
|
2020-02-22 10:14:27 +01:00
|
|
|
enum34<=1.1.6
|
2018-12-04 15:08:32 +01:00
|
|
|
ldaptools>=0.15
|
2019-02-13 08:17:02 +01:00
|
|
|
oldldap: python-ldap<3
|
2020-04-22 14:46:01 +02:00
|
|
|
py2: django-appconf<1.0.4
|
|
|
|
py2: django-filter<2
|
2020-06-06 06:23:32 +02:00
|
|
|
py3: django-filter<2.3
|
2020-04-28 02:03:35 +02:00
|
|
|
drf34: djangorestframework>=3.4,<3.4.1
|
2020-04-22 14:46:01 +02:00
|
|
|
drf39: djangorestframework>=3.9.2,<3.10
|
2020-09-25 18:34:15 +02:00
|
|
|
usedevelop = True
|
2015-09-22 22:40:36 +02:00
|
|
|
commands =
|
2020-04-22 14:46:01 +02:00
|
|
|
py2: ./getlasso.sh
|
2020-02-10 14:03:19 +01:00
|
|
|
py3: ./getlasso3.sh
|
2020-05-05 13:18:46 +02:00
|
|
|
authentic: ./check-migrations.sh
|
2020-10-01 11:49:10 +02:00
|
|
|
rbac,authentic: py.test {env:PYTESTOPTIONS:} {env:FAST:} {env:REUSEDB:} {env:COVERAGE:} {env:JUNIT:} {env:SW:} {posargs:{env:TESTS} --random-group}
|
2018-12-07 15:03:35 +01:00
|
|
|
|
2019-05-10 12:42:29 +02:00
|
|
|
[testenv:pylint]
|
2021-03-31 23:31:27 +02:00
|
|
|
basepython = python3
|
|
|
|
setenv =
|
|
|
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
|
|
SETUPTOOLS_USE_DISTUTILS=stdlib
|
2019-05-10 12:42:29 +02:00
|
|
|
deps =
|
2021-03-31 23:31:27 +02:00
|
|
|
pylint
|
|
|
|
pylint-django
|
|
|
|
psycopg2-binary
|
2019-05-10 12:42:29 +02:00
|
|
|
commands =
|
2021-03-31 23:31:27 +02:00
|
|
|
./getlasso3.sh
|
|
|
|
bash -c 'pylint -f parseable --rcfile pylint.rc src/authentic2_idp_cas src/authentic2_auth_oidc src/authentic2_idp_oidc src/authentic2_auth_saml src/authentic2 src/django_rbac src/authentic2_auth_fc | tee pylint.out'
|
2019-05-10 12:42:29 +02:00
|
|
|
|
2020-04-16 14:34:00 +02:00
|
|
|
[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
|
2020-05-05 11:53:35 +02:00
|
|
|
./authentic2-ctl {posargs:--help}
|
2020-04-16 14:34:00 +02:00
|
|
|
|
2021-03-30 10:10:04 +02:00
|
|
|
[testenv:code-style]
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
pre-commit
|
|
|
|
commands =
|
|
|
|
pre-commit run black --all-files --show-diff-on-failure
|
2021-03-30 10:34:19 +02:00
|
|
|
pre-commit run isort --all-files --show-diff-on-failure
|
2021-03-30 10:10:04 +02:00
|
|
|
|
2018-12-07 15:03:35 +01:00
|
|
|
[pytest]
|
|
|
|
filterwarnings =
|
2020-12-03 09:52:08 +01:00
|
|
|
ignore
|
|
|
|
once:::authentic2.*
|
2020-04-22 14:46:01 +02:00
|
|
|
junit_family=xunit2
|
2020-08-28 09:27:41 +02:00
|
|
|
|
|
|
|
[coverage:run]
|
|
|
|
source =
|
|
|
|
authentic2
|
|
|
|
authentic2_auth_fc
|
|
|
|
authentic2_auth_oidc
|
|
|
|
authentic2_auth_saml
|
|
|
|
authentic2_idp_cas
|
|
|
|
authentic2_idp_oidc
|
|
|
|
django_rbac
|
2020-09-25 18:34:15 +02:00
|
|
|
branch = True
|