2013-06-23 00:27:09 +04:00
[tox]
2016-06-08 22:41:59 +03:00
skipsdist = true
2013-06-23 00:27:09 +04:00
envlist =
2016-06-02 18:18:33 +03:00
api-lint,
ui-lint,
api,
ui,
coveralls
2013-06-23 00:27:09 +04:00
[testenv]
2016-06-02 18:18:33 +03:00
basepython = python2.7
2013-06-23 00:27:09 +04:00
setenv =
2016-06-02 18:18:33 +03:00
DJANGO_SETTINGS_MODULE = awx.settings.development_quiet
2016-06-08 22:41:59 +03:00
SWIG_FEATURES = -cpperraswarn -includeall -I/usr/include/openssl
2016-06-02 18:18:33 +03:00
HOME = {homedir}
USERPROFILE = {homedir}
2016-06-08 22:41:59 +03:00
ANSIBLE_VENV_PATH = {toxworkdir}
2017-07-24 19:23:54 +03:00
AWX_VENV_PATH = {toxworkdir}
2016-06-08 22:41:59 +03:00
SKIP_SLOW_TESTS = True
[testenv:api-lint]
2013-06-23 00:27:09 +04:00
deps =
2016-06-02 18:18:33 +03:00
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/requirements_dev.txt
coverage
coveralls
commands =
make flake8
2013-06-23 00:27:09 +04:00
2016-06-02 18:18:33 +03:00
[testenv:ui-lint]
2016-06-08 22:41:59 +03:00
deps =
nodeenv
2016-06-02 18:18:33 +03:00
commands =
make jshint
2013-06-23 00:27:09 +04:00
2016-06-02 18:18:33 +03:00
[testenv:api]
2016-06-08 22:41:59 +03:00
deps =
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/requirements_dev.txt
2016-06-20 17:48:58 +03:00
ansible
2016-06-08 22:41:59 +03:00
coverage
coveralls
2016-06-02 18:18:33 +03:00
commands =
2016-06-08 22:41:59 +03:00
python setup.py develop
# coverage run --help
# coverage run -p --source awx/main/tests -m pytest {posargs}
2017-02-07 18:42:09 +03:00
py.test awx/main/tests awx/conf/tests awx/sso/tests {posargs:-k 'not old'}
2013-11-15 07:55:03 +04:00
2016-06-02 18:18:33 +03:00
[testenv:ui]
2016-06-08 22:41:59 +03:00
deps =
nodeenv
2016-06-02 18:18:33 +03:00
commands =
make UI_TEST_MODE = CI test-ui
2017-03-13 19:57:47 +03:00
[testenv:ansible]
deps =
ansible
pytest
-r{toxinidir}/requirements/requirements_ansible.txt
commands =
{envdir}/bin/py.test awx/lib/tests/ -c awx/lib/tests/pytest.ini {posargs}
2016-06-02 18:18:33 +03:00
[testenv:coveralls]
commands =
coverage combine
coverage report -m
coveralls
2013-11-15 07:55:03 +04:00
2016-06-08 22:41:59 +03:00
[pytest]
DJANGO_SETTINGS_MODULE = awx.settings.development
python_paths = venv/tower/lib/python2.7/site-packages
site_dirs = venv/tower/lib/python2.7/site-packages
python_files = *.py
addopts = --reuse-db --nomigrations --tb=native
markers =
ac: access control test
license_feature: ensure license features are accessible or not depending on license
mongo_db: drop mongodb test database before test runs