552c63849e
A 'gabbi' tox target is added which runs a declarative HTTP tests described in YAML files in 'ceilometer/tests/gabbi/gabbits' and loaded by 'ceilometer/tests/gabbi/test_gabbi.py'. These are driven by the 'gabbi' python package (available from PyPI). tox and testr are configured to start and run the tests efficiently: * a mongodb server, using multiple databases, is made available * the API wsgi application is used directly via 'wsgi-intercept', no web server required * each YAML file is run as a sequence and where number of processors allows, in a different test process * individual tests can be requested in the usual way: tox -egabbi -- <test pattern> If this is done, all the tests prior to the one requested, from its YAML file, will be run as ordered prerequisites. * tox targets that already run the tests in ceilometer/tests will also discover gabbi tests. If there is no mongodb, they will be skipped. A ConfigFixture does the necessary work of adjusting the configuration and pipeline to use the mongodb database and nothing else. An internal InterceptFixture uses wsgi-intercept to access the ceilometer API. Each yaml file has its own intercepted host. Fixtures are implemented as nested context managers that are declared per YAML file, see ceilometer/gabbi/fixtures.py and fixtures-samples.yaml for an example of how they can be used. Every yaml file uses at least ConfigFixture. YAML files can use a variety of strategies for formatting requests and evaluating the correctness of response. See: http://gabbi.readthedocs.org/en/latest/format.html The YAML files included here test simple API features for creating and retrieving samples. Subsequent patches can (and should) create additional YAML files to describe more complex scenarios that cover the entire API (for example alarms are not touched at all by this patch). Change-Id: I52551f88bc3beac4bf8a92afa45ac70cd97ffcec Implements: blueprint declarative-http-tests
29 lines
731 B
Plaintext
29 lines
731 B
Plaintext
# The order of packages is significant, because pip processes them in the order
|
|
# of appearance. Changing the order has an impact on the overall integration
|
|
# process, which may cause wedges in the gate later.
|
|
|
|
# Hacking already pins down pep8, pyflakes and flake8
|
|
hacking>=0.10.0,<0.11
|
|
Babel>=1.3
|
|
coverage>=3.6
|
|
discover
|
|
fixtures>=0.3.14
|
|
httplib2>=0.7.5
|
|
mock>=1.0
|
|
MySQL-python
|
|
# Docs Requirements
|
|
oslosphinx>=2.2.0 # Apache-2.0
|
|
oslotest>=1.2.0 # Apache-2.0
|
|
psycopg2
|
|
pylint>=1.3.0 # GNU GPL v2
|
|
pymongo>=2.5
|
|
python-subunit>=0.0.18
|
|
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
|
sphinxcontrib-docbookrestapi
|
|
sphinxcontrib-httpdomain
|
|
sphinxcontrib-pecanwsme>=0.8
|
|
testrepository>=0.0.18
|
|
testscenarios>=0.4
|
|
testtools>=0.9.36,!=1.2.0
|
|
gabbi>=0.5.0
|