8760b9cde9
Add generic functionality for functional tests using tempest-lib and create related tox jobs. Run of functional tests requires: 1) Access to deployed OpenStack with running, at least, Keystone and Manila services. 2) Defined config options to be able to execute requests to Manila, Manilaclient should know auth related information like username, password, tenant_name, etc... 3) Run of functional tests searches for following optional env vars to be set: 'OS_MANILACLIENT_CONFIG_FILE' - name of conf file, default 'manilaclient.conf' 'OS_MANILACLIENT_CONFIG_DIR' - path to conf dir, default '%project_dir%/etc/manilaclient' 'OS_MANILA_EXEC_DIR' - path to dir with manilaclient executable, default '%project_dir%/.tox/functional/bin' 4) Config sample can be generated by following new tox job: $ tox -egenconfig it will create sample in "%project_dir%/etc/manilaclient/manilaclient.conf.sample" then just rename it removing ".sample" part and set option values. To run functional tests use following new tox job: $ tox -efunctional To run only some specific tests use following: $ tox -efunctional manilaclient.tests.functional.foo.bar Partially implements blueprint functional-tests Change-Id: I95a4e441d2143e51c54ec4fb47a069a91ed77dd7
50 lines
1.1 KiB
INI
50 lines
1.1 KiB
INI
[tox]
|
|
distribute = False
|
|
envlist = py26,py27,py33,py34,pep8
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
LANG=en_US.UTF-8
|
|
LANGUAGE=en_US:en
|
|
LC_ALL=C
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = python setup.py testr --testr-args='{posargs}'
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:functional]
|
|
setenv =
|
|
VIRTUAL_ENV = {envdir}
|
|
OS_TEST_PATH = ./manilaclient/tests/functional
|
|
OS_MANILA_EXEC_DIR = {envbindir}
|
|
commands =
|
|
{envbindir}/python setup.py install
|
|
{envbindir}/python setup.py testr --testr-args='{posargs}'
|
|
|
|
[testenv:genconfig]
|
|
whitelist_externals = bash
|
|
commands =
|
|
{envbindir}/python setup.py install
|
|
{envbindir}/oslo-config-generator --config-file etc/oslo-config-generator/manilaclient.conf
|
|
|
|
[testenv:cover]
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[tox:jenkins]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[flake8]
|
|
# F821: undefined name
|
|
ignore = F821
|
|
builtins = _
|
|
exclude = .venv,.tox,dist,doc,openstack,*egg
|