This is effectively os-testr but maintained.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I97183318f715b03f31145fa3d0f00bb7bc8a0c82
new ostestr is different and is breaking gate. i don't think we
really need ostestr since we don't use it in any of the projects
under Telemetry. so to remain consistent and simple, just follow
similar pattern.
Change-Id: I742de2107cf56ef8b223fa1431529e706cc52377
Each config option has limitation for type and value.
In production code, oslo.conf can ensure user's input
is valid, but in unit test, test methods can pass if
we use method CONF.set_override without parameter
enforce_type=True even we pass wrong type or wrong
value to config option. This commit makes sure calling
method CONF.set_override with enforce_type=True.
Closes-bug: #1517839
Change-Id: If01841b30c10e994028dcdefbb389425cb0facb1
We actually do not run the tests with different backend at the same
time, so there's no need for scenarios.
Change-Id: I2cc7aaee04834d1949bdb3c547f0d5b893d13aef
There's no way to connect to a backend only using an URL, because of
parameters such as mongodb_replicaset, etc. So we just remove
get_connection(url) function and always relies on
get_connection_from_config(conf).
Change-Id: I39fabbc78325709150dc7f4edb474c7bd9501205
- Removes the specific alarm_connection option
- Simplify get_connection*() functions and hardcode the namespace
Change-Id: I9ac13c6e9356867a815e0b8afec4815916bf3a65
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 itertools.ifilter() with six.moves.filter()
* Replace itertools.imap() with six.moves.map()
* Replace map(_compare, statistics)
with [_compare(statistic) for statistic in statistics]
* Replace obj.iterkeys() with six.iterkeys(obj)
* Replace obj.iteritems() with six.iteritems(obj)
* Replace xrange() with six.moves.xrange(), or with range() for small
ranges
* Replace the repr module with six.moves.reprlib
Change-Id: Iaaa328cc15355182bde444a1aeaa4385691c8f90
enable a listener in collector that listens to events queue. this
patch also renames 'metering_*' options which are now used by both
events and samples.
Change-Id: I6250c91e913864c3973e2d93022e38ad8bed8328
Implements: blueprint notification-pipelines
This has not been tested for months and doesn't work anymore. There's no
way people are using it, so let's drop it until someone starts fixing it
again.
Change-Id: I7d6472a1924320c890dec47c41bf22db07a36efc
oslo.utils 1.2.0 has changed its namespace from oslo.utils to
oslo_utils, the old import style of oslo.utils still can work but
it is deprecated.
Change-Id: I8832259624f15a8040f6de35136db7dd6d217f02
This script is helpful for emulate real workflow.
Generate and send sample batches with different resources and
configurable counter_name.
Change-Id: I3ab6472c99abfe28e8c200ada2da91e97abed1d2
This change allows the script tools/make_test_data.sh and
tools/make_test_data.py to work correctly by handing
exceptions appropriately.
Change-Id: Ib054c3e10d617686928bf03f94c5ff868905afde
Closes-bug: 1389684
This patch fixes the pep8 issues of the tool scripts and
configures tox to run pep8 on the tools directory.
Change-Id: Ifed21e19dd2b382790a1e2a90d5153a8845c4b64
Parseable output format and --include-ids parameter are deprecated
and ignored in the pylint version used on the gate.
These functions are replaced by the --msg-template parameter.
This patch changes the runner to use the new parameter so that the
job can run properly on the gate
Closes-Bug: #1394606
Change-Id: Ia3e531923caa3f4e9a0dd03e0a4f5ef1a6d3dafb
Columns generated in event table and t_datetime in
trait table shouldn't be type of double precision.
Change-Id: Ib9c5c8de034b5d1ccaa070b6de7c0d682160200c
Closes-Bug: #1337851
With the latest version of oslotest, we can now take advantage
of a common oslo_debug_helper script.
We can now remove our own homebrewed version, minor changes to
tox.ini were needed.
Change-Id: Ibd4317e8b1a9e38c9f4ef839352b74f14e9ddcfa
similar to make_test_data.py, this script generates a set of events
and writes them to the database (defined in ceilometer.conf).
configurable options:
- start - number of days in past to start test data
- end - number of days into the future to start test data
- interval - period between events, in minutes
- event_types - number of unique event_types
Change-Id: I80e023a82f7d5129649a5b1de5256e41e901e3c1
the config generator has been moved to oslo.config. this patch
switches to use oslo.config and removes related deprecated code.
Change-Id: I9a22336142913d65da6299ea4092e170c9b2ff33
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
Currently, unittests at real HBase are not usually used.
Jenkins jobs and a predominant amount of developers use
HBase mock. One of the reasons for this is that unittests at real
HBase are too slow. It's due to processing of "disable_table"
and "delete_table" commands. In HBase these command take up
to 1-2 seconds. Now we create all table-set for each test that's
why at real HBase unit tests may be executed several hours.
So, at real HBase backend unit tests may be executed several hours.
My CR speeds up this case. To solve this problem it was decided
to keep all test data in one table. To provide a distinguishability
of data from different tests unique row-prefix is used for each one.
Creating and deleting required table are implements at
setup-test-env.sh.
Separating data is implemented with mock.patchs which transforms row
value in happybase.Table methods.
Change-Id: I1883d6e0619b0b2f223a4e58bdc0fc0656636e1f
Closes-bug: #1372912
auth_token middleware is deprecated from keystoneclient. this
patch updates references to use keystonemiddleware instead.
Change-Id: I79b9657cafbc66000ee63b8d16104af9cd32552d
Closes-Bug: #1373115
Adding init into tools folder so functions from the tools can be
imported elsewhere.
Change-Id: I89347be8e7ef4fdb1428a369c9ed2dfd1f962e9a
Related-Bug: #1349791
-Adding random boundaries rather than exact value for samples
-Allowing to pass datetime object or string
-Extracting make_test_data func, so it can be imported elsewhere
-Converting the integer time span to datetime
Change-Id: Iffbc8d9711b2f301a1f28b49980691ab34d17c20
Related-Bug: #1349791
Running a test with pdb was difficult because tox captures
output and causes pdb prompt to quit.
Tips for how to run with debug are provided here:
https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests
This change puts these commands into a debug env in tox.ini so
you can do a command like:
tox -e debug pycadf.tests.test_cadf_spec
and when it hits your breakpoint you'll get the debug prompt.
Change-Id: Ic53a888e4e305d51159d1d6a2f962786a532e089
Co-Authored-By: Brant Knudson <bknudson@us.ibm.com>
Closes-Bug: #1350424
Method get_connection has been renamed to
get_connection_from_config.
Resource is object not dictionary, so attributes needs to be
accessed that way.
Change-Id: I19e09f3e9077d3346b4361fa6975a3e696e2e765
Related-Bug: #1349791
This change is needed to make Ceilometer code both Python 2.x and
3.x compatible in some future. Oslo modules are left without
changes in this change, that will be done directly in the
oslo-incubator code.
Partially-Implements: blueprint ceilometer-py33-support
Change-Id: Ic7fe5819f85524bb36f04dec6cad10d4cf2b935d
The word "Copyright" alone is sufficient to claim copyright, the (c)
symbol need not be present.[1]
As per PEP 263, a Python file with non-ASCII characters must have a
line with "coding: <some-encoding>". Python files containing only
7-bit ASCII characters need no such line.[2]
This commit removes unnecessary Unicode copyright symbols and
unnecessary encoding lines.
[1]: http://www.copyright.gov/circs/circ03.pdf
[2]: http://legacy.python.org/dev/peps/pep-0263/
Closes-Bug: #1324686
Change-Id: Id381ea1f029a0cfddd3773c6d9f16c47842d9c33
The patch replaces oslo.rpc by oslo.messaging.
The important changes:
- On the collector, the queue name and the topic are now the same
(ie: metering, instead of ceilometer.collector.metering for the queue
and metering for the topic)
- Same for the alarm partitionner the queue is no more prefixed by
ceilometer.alarm.
Implements switch-to-oslo.messaging
Change-Id: Ia5e4ff1dd1d419c090b8039627234ae7f07e8660
Sync code to commit: b7ad6ddab8b1d61bf4f52ccaa461a9d68809747b
The oslo db API have been changed, so sqlalchemy driver have been updated
to match these changes.
We now use sqlalchemy/migration.py from oslo.db instead of the
ceilometer one.
The unused alembic code have been removed, because it is handled by
oslo.db now.
Closes bug: #1293409
Change-Id: I480d678a7165f32b92c5c9b4c55491c0edbc0991
Follow oslo.config style guide for help strings better to create
consistent help strings:
* Capitalize first word of each help string
* Finish help strings with "."
* Improve wording
Change-Id: I4723ad672c30146869254695ba82678b082efd91