
This patch adds an xfstests-style functional test suite. Run "tox -e tempauth" to test swift3 with TempAuth, and "tox -e keystone" to test with the Keystone auth system. You don't need to prepare Swift and Keystone system for that. They will be started with minimum configuration automatically. If you already have a Swift cluster for the functional test, run "./check" in the test directory directly. Individual tests can be run using "./check 003", and various other options are also supported. Try "./check -h" for more information. I added some sample test cases but they are not enough at all obviously. More tests will be added soon. Change-Id: I75abce574768abbe88f60d8c1eee87757651e357
58 lines
1.4 KiB
INI
58 lines
1.4 KiB
INI
[tox]
|
|
envlist = py26,py27,tempauth,keystone,pylint,pep8
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
whitelist_externals =/bin/bash
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
deps =
|
|
https://launchpad.net/swift/icehouse/1.13.0/+download/swift-1.13.0.tar.gz
|
|
https://launchpad.net/keystone/icehouse/2014.1.1/+download/keystone-2014.1.1.tar.gz
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = nosetests {posargs:swift3/test/unit}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_OPENSTACK=1
|
|
NOSE_OPENSTACK_COLOR=1
|
|
NOSE_OPENSTACK_RED=0.05
|
|
NOSE_OPENSTACK_YELLOW=0.025
|
|
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
|
NOSE_OPENSTACK_STDOUT=1
|
|
NOSE_WITH_COVERAGE=1
|
|
NOSE_COVER_BRANCHES=1
|
|
|
|
[testenv:tempauth]
|
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
|
setenv = AUTH=tempauth
|
|
|
|
[testenv:keystone]
|
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
|
setenv = AUTH=keystone
|
|
|
|
[testenv:pylint]
|
|
commands = pylint -E swift3
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_COVERAGE=1
|
|
NOSE_COVER_BRANCHES=1
|
|
NOSE_COVER_HTML=1
|
|
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
|
|
|
[tox:jenkins]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[flake8]
|
|
# follow the same style guidelines with swift
|
|
ignore = H
|
|
select = H102,H103,H201,H501,H903
|
|
exclude = .venv,.git,.tox,dist,doc,*egg,build
|
|
show-source = True
|