This CR allows running "functional" tox job for different backends.
Short description about expected workflow:
1. Gate job run ceilometer/ceilometer/tests/functional/hooks/post_test_hook.py
with <backend> parameter.
2. This script run "tox -efunctional" command with defined variable
CEILOMETER_TEST_BACKEND
3. After in "run-functional-tests.sh" setup script for the backend
and testr are runned.
In this CR running testr with pretty_tox.sh script added because
it allows to use subunit-trace output which developed in tempest-lib
and improve useful of testr output.
Partially implements: blueprint ceilometer-functional-tests
Change-Id: Idb66aca0b46779516db2baec856df8223dbe5c13
* Replace contextlib.nested() with contextlib.ExitStack
* Add contextlib2 dependency for Python 2.6 and 2.7 to get ExitStack
* TestLibvirtInspection: set libvirtError because it must be a subclass
of Exception on Python 3
Enable ceilometer.tests.compute.virt.libvirt.test_inspector on Python 3.
Change-Id: I82f4b911c1b3ede90805150630c222b1dd5f3474
As discussed in the Liberty Design Summit "Moving apps to Python 3"
cross-project workshop, the way forward in the near future is to
switch to the pure-python PyMySQL library as a default.
https://etherpad.openstack.org/p/liberty-cross-project-python3
Change-Id: I058419b25f55dcfd93af522aa1f5f61b8f06407e
happybase and oslo.vmware are optional requirements for ceilometer.
they should be in test-requirements.
Change-Id: I28ae8f12c965ef6da32aeaf5104ede88211e0ff9
this patch implements an elasticsearch driver for events.
Implements: blueprint elasticsearch-driver
Change-Id: Ie579f325685c14aed78d83de7c6d7bff326bc188
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
Pylint usage pattern is to take a look on a diff for pylint results between
previous code version and current patch. It's needed to critical issues only.
Change-Id: I4fc2ae732a7eaef2bc7bfacfd111ef849d003268
* Creates a new tox env py-pgsql
* Adds a new script setupt-test-env-postgresql.sh to set up postgresql
* Renames the MySQLDbManager into SQLManage, used by both mysql and
postgresql tests
* Creates a new scenario for posgresql in the
MixinTestsWithBackendScenarios
Related to blueprint sql-unit-tests-on-real-backend
Co-Authored-By: Ala Rezmerita <ala.rezmerita@cloudwatt.com>
Change-Id: I60af82d5d8b5750884ba0d1ca726645f8b31448b
current oslo.messaging isn't py33 compatible so this patch skips it
so it does not block other requirements
Change-Id: I8d438a24f456839023e4c66e861f52d513de2148
swift was being imported to provide a blank Request
object but very little of the functionality in that
object was being used. FakeRequest provides the
bare minimum funcionality required:
* REQUEST_METHOD
* PATH_INFO
* wsgi.input based on cStringIO
* custom header manipulation
Other functionality from swift has either been
duplicated or replaced:
* InputProxy (which counts bytes of request bodies)
has been duplicated.
* logging uses common log functionality
* path_split does straight string splits for the desired results
Note that these changes do nothing to change functionality nor
anything to address the performance concerns being evaluated
and discussed elsewhere.
Closes bug: 1285388
Change-Id: If0fbb8f00765ac915e5b426a3661492f4b4df9f4
This was added to work around bug 1091333. A new sphinx has been
released and so this is no longer necessary.
Change-Id: I6ea61a3cc441dd1ca2ced7e2fd837a55b917f76d
Hacking 0.9.0 had a minor bug so require 0.9.2 or higher.
In order to keep this patch to just a requirements bump, ignore new and
stricter hacking rules that are being triggered. Fixing up the code and
turning these on is out of scope of this patch and is for future patches.
Change-Id: I64f46c92e49625a519c902d402be94c914c50816
requirements.txt is only appropriate for libraries that are
always needed, as they will be installed all the time. However
if actually trying to run multinode you won't have databases or
database access on the compute nodes.
So you can't pip install -r requirements.txt on those environments.
For an example, see Nova.
Change-Id: Ic962e518b8ffa0457031d5851f83285abb5096df
The nova notifier is again broken due to Nova switch to oslo.messaging.
Anyway, it's likely that this code has been broken for a long time, as
it is not enabled nor tested on devstack anymore. And it's very unlikely
compatible with oslo.messaging.
This patch only disable the run of the tests for now, but we might
consider removing the code before i3 if nobody stands up and try to fix
it in a way or another.
This patch also update the configuration file for the new keystoneclient
release.
Change-Id: I679154baff476957f46e7930db69aeec7e368648