tempest-plugin/tox.ini
Rick Bartra 9f473f288a Add Additional RBAC Test Coverage for Shipyard
This commit does the following:
- Add test coverage for:
  - Actions API
  - Airflow Monitoring API
  - Log Retrieval API
- Add tox.ini
- Add hacking checks
- Fix pep8 issues

Future work needed to fix some of the Actions API RBAC tests

Change-Id: I6e17ffa3ecc3c8a181790bdb79ad6b29fe127114
2018-08-21 16:25:32 -04:00

105 lines
3.3 KiB
INI

[tox]
minversion = 1.6
envlist = pep8,py35,py27
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH=./airship_tempest_plugin/tests/unit
LANGUAGE=en_US
LC_ALL=en_US.utf-8
PYTHONWARNINGS=default::DeprecationWarning
passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_PATH http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
whitelist_externals = find
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
stestr --test-path ./airship_tempest_plugin/tests/unit run {posargs}
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
check-uuid --package airship_tempest_plugin.tests.api
[testenv:uuidgen]
basepython = python3
commands = check-uuid --package airship_tempest_plugin.tests.api --fix
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands = rm -rf *.pyc
rm -rf cover
rm -f .coverage
nosetests {posargs}
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_COVERAGE=1
NOSE_COVER_BRANCHES=1
NOSE_COVER_PACKAGE=airship_tempest_plugin
NOSE_COVER_HTML=1
NOSE_COVER_HTML_DIR={toxinidir}/cover
NOSE_WHERE=airship_tempest_plugin/tests/unit
whitelist_externals = nosetests
rm
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -W -b html doc/source doc/build/html
whitelist_externals = rm
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
whitelist_externals = rm
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t airship_tempest_plugin/tests {posargs}
[flake8]
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H204] Use assert(Not)Equal to check for equality.
# [H205] Use assert(Greater|Less)(Equal) for comparison.
# [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
# [H904] Delay string interpolations at logging calls.
enable-extensions = H106,H203,H204,H205,H210,H904
show-source = True
# E123, E125 skipped as they are invalid PEP-8.
#
# H405 is another one that is good as a guideline, but sometimes
# multiline doc strings just don't have a natural summary
# line. Rejecting code for this reason is wrong.
ignore = E123,E125,H405
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
local-check-factory = airship_tempest_plugin.hacking.checks.factory
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt