summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add tests for setupAlessio Ababilov2013-01-301-0/+114
| | | | | | | | Test write_git_changelog, generate_authors, get_cmdclass, and parse_dependency_links. Also test private _run_shell_command function. Change-Id: I583d679afc1dc805c920b4beffc2f664833aabd0
* Add TTL to AMQP messagesBrent Eagles2013-01-282-5/+123
| | | | | | | | | | This patch sets a TTL derived from the timeout parameter used when invoking the RPC. Needed for: * Bug 1053614 Change-Id: Idaf9a2a972feac3f95f170c52632033b027b4414
* Merge "Prevent parallel test port clashes for zmq."Jenkins2013-01-282-6/+14
|\
| * Prevent parallel test port clashes for zmq.Monty Taylor2013-01-242-6/+14
| | | | | | | | | | | | | | | | | | The scheme of incrementing port numbers did not work so well for parallel test runs. Part of blueprint grizzly-testtools. Change-Id: I100e79ae79e4409691145dc721139d1a86839199
* | Merge "Replace direct use of testtools BaseTestCase."Jenkins2013-01-2830-132/+121
|\|
| * Replace direct use of testtools BaseTestCase.Monty Taylor2013-01-2430-132/+121
| | | | | | | | | | | | | | | | | | Using the BaseTestCase across the tests in the tree lets us put in log fixtures and consistently handle mox and stubout. Part of blueprint grizzly-testtools. Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
* | Merge "Remove the last of the nose-isms."Jenkins2013-01-281-13/+12
|\|
| * Remove the last of the nose-isms.Monty Taylor2013-01-241-13/+12
| | | | | | | | | | | | | | | | | | testtools provides a skipTest method, so there's no need to pull in nose directly into the tests. Part of blueprint grizzly/testtools. Change-Id: I97a9f09a27cad0433949a96fc18001ecf69c8ba2
* | Merge "Replaced direct usage of stubout with BaseTestCase."Jenkins2013-01-286-39/+13
|\|
| * Replaced direct usage of stubout with BaseTestCase.Monty Taylor2013-01-246-39/+13
| | | | | | | | | | | | | | | | BaseTestCase properly hooks stubout into fixtures. Just use that. Part of blueprint grizzly-testtools. Change-Id: I4bf6b92b9b16d051d8c6ecaf52cf70925848ed8c
* | Merge "Fix up test_qpid to use BaseTestCase."Jenkins2013-01-282-30/+16
|\|
| * Fix up test_qpid to use BaseTestCase.Monty Taylor2013-01-242-30/+16
| | | | | | | | | | | | | | | | While we're in there, simplify its use of fixtures. Part of blueprint grizzly-testtools. Change-Id: I7ef05cc9c191aab1959a31770f905f34447e64ea
* | Merge "Use testtools as test base class."Jenkins2013-01-2843-341/+207
|\|
| * Use testtools as test base class.Monty Taylor2013-01-2443-341/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | On the path to testr migration, we need to replace the unittest base classes with testtools. Replace tearDown with addCleanup, addCleanup is more resilient than tearDown. The fixtures library has excellent support for managing and cleaning tempfiles. Use it. Replace skip_ with testtools.skipTest Part of blueprint grizzly-testtools. Change-Id: I45e11bbb1ff9b31f3278d3b016737dcb7850cd98
* | Merge "UTC ISO8601 from timestamp"Jenkins2013-01-231-0/+7
|\ \
| * | UTC ISO8601 from timestampFlaper Fesp2013-01-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Taken from glance xattr.py module. This function converts timestamp formated dates into a UTC Iso 8601 date. It is being required in multiple places now (mostly on clients printing dates) in order to make dates human readable. Change-Id: I6f19325a4c2df241a0ef76bd256280a2930d9265
* | | Import timeutils.is_soon from keystoneclientJulien Danjou2013-01-231-0/+6
| |/ |/| | | | | | | | | | | | | | | | | This is a function defined as will_expire_soon at least twice in python-keystoneclient, and it's actually quite handy. There is a comment on that code about moving to timeutils, and it actually sounds like a good idea since I'm likely to use it in Ceilometer, so here it is. Change-Id: Idf208ce9e7ce9048a38d98212b7f730c6b7c8288 Signed-off-by: Julien Danjou <julien@danjou.info>
* | Move logging config options into the log moduleMark McLoughlin2013-01-212-61/+56
|/ | | | | | | | | | | | | | | | | | We learned a lesson in Nova - it's best to declare and use config options within a single module if possible. Globally declared and use config options grow like weeds and it becomes harder to find out if, where and how individual options are used. Strangely, in cfg itself, we randomly declare a bunch of logging options which are only used within the openstack.common.log module - let's move the options there and remove the CommonConfigOpts class before they become part of the API we commit to when oslo-config is released. A minor detail in the patch - the logfile and logdir options are already deprecated in favour of log_file and log_dir, but we never got around to removing all other traces of the deprecated options. Change-Id: I3913ea54465658d93dc56e014dfe5d911b0541d6
* Fixes import order errorsZhongyue Luo2013-01-188-9/+9
| | | | Change-Id: I3e35230dd2d96ab9f5a8c11b9ec1cd8d2d00e347
* Rework zmq setup and cleanupMark McLoughlin2013-01-151-1/+0
| | | | | | | | | | | | | | | Register config options at import time and remove the register_opts() function. It seems this isn't being used. Add accessor methods for ZMQ_CTXT and matchmaker so that they are lazily created rather than created at import time. Remove the rpc_zmq_matchmaker override in the tests since MatchMakerLocalhost is the default anyway. We were setting it with an incorrect value, but only after the matchmaker had already been created. Change-Id: I2520252c64d70e4c4903e34d07952fed43e70ebe
* Merge "Implement importutils.try_import."Jenkins2013-01-151-0/+8
|\
| * Implement importutils.try_import.Dan Prince2013-01-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new (simple) importutils.try_import function which can return a module name or a default (by default this is None). This should help clean up some of our try: import foo except... blocks in modules. This commit also drops the dependency on python-extras which is no longer needed. Fixes LP Bug #1099501. Change-Id: I8591f79983bdad67a50d1aaae6dce8428dfce084
* | reusable ZmqProxy service initializationEric Windisch2013-01-131-27/+2
|/ | | | | | | | | | | Move near-identical proxy setup code from oslo-zmq-receiver and test_zmq into ZmqProxy's consume_in_thread method Provides code reuse and simplifies the tests and receiver binary. Change-Id: I1324eacfa2a456599d5fd462b6476ddf659e95c4
* Merge "Verbose should not enable debug level logging"Jenkins2013-01-131-1/+7
|\
| * Verbose should not enable debug level loggingDavanum Srinivas2013-01-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes LP #989269 Currently setting --verbose in will still allow DEBUG level message to be logged to python logger object. we need to check for --debug first (set DEBUG level), then --verbose (set INFO level) and if neither is set then set default to WARNING DocImpact Change-Id: Ic9e3cb5979b2d7283552ad3a461870373f45a239
* | Merge "Fix pep8 E125 errors."Jenkins2013-01-121-1/+1
|\ \
| * | Fix pep8 E125 errors.Monty Taylor2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | Caesar's wife must be above reproach. Change-Id: Iac85a57e71d403360f1567c07c8699057f0772fb
* | | Merge "Simplify version processing."Jenkins2013-01-121-3/+4
|\ \ \ | |_|/ |/| |
| * | Simplify version processing.Monty Taylor2013-01-111-3/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | In response to the cessation of per-commit tarballs produced by the CI systems, simplify the version processing code. We did many many many complicated things to support producing release artifacts that were not actually supported release artifacts. After a bunch of issues emerged, it was determined that the best way forward was to stop producing quasi-not-really non-release tarballs. If people want to consume versions of openstack that are not released versions, the git repos are always available. Additionally, this patch removes versioninfo and just uses PKG-INFO and pkg_resources to handle version processing. Change-Id: I5c799f3520adb2ba5288d852543706d81a92f8a1
* / Address test_zmq setup/teardown racesEric Windisch2013-01-101-16/+17
|/ | | | | | | | | | | | Each test now consumes a new port number (9500+), and socket directory based on an auto-incrementing global counter (TESTCNT). Also makes minor cleanup to test receiver setup logic. fixes bug 1096223 Change-Id: Ie6a88c535c81f2fc12b97d32c2674a6184325d2a
* Revert "Support lookup of value using "group.key""Mark McLoughlin2013-01-081-6/+0
| | | | | | | | | | | | | | | This reverts commit 525ac47. There are already two ways to reference an option in a group: CONF.group.key CONF[group].key Adding a third variant doesn't seem ideal. Also, for the specific case of LazyPluggable in Nova, we can easily just pass an optional config group name to the constructor. Change-Id: I1a29a18d90e8af3ce2563bd1b3eeb64422140016
* Merge "Fix publish_errors unit test"Jenkins2013-01-081-8/+9
|\
| * Fix publish_errors unit testMark McLoughlin2013-01-031-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit test for publish_errors=True causes logging to be spewed from other tests because it configures the default root logger rather than creating its own logger like other logging tests do. This makes the unit tests completely silent again. Also, it hooked into the rpc notifier to catch notifications when it can simple hook into the no-op notifier like other tests. Finally, it used stubout to override the value of config options rather than the BaseTestCase.config() helper method. Change-Id: I13313fcd9ad8f9e5bcb9af90652b5dde5c3feec9
* | Merge "JSONDictSerializer encode objects to unicode"Jenkins2013-01-081-0/+11
|\ \
| * | JSONDictSerializer encode objects to unicodeSean McCully2013-01-031-0/+11
| |/ | | | | | | | | | | | | | | | | | | Averts raising ValueError, Circular Reference Detected exception. Add additional test to JSONDictSerializerTest testing that JSONDictSerializer correctly serializes objects into unicode repr. and not raise error Fixes: bug #1089100 Change-Id: Ifdb0562c7c43ab66617dddb65f16f893df2f4895
* | Merge "rpc method arguments should be dict, not list"Jenkins2013-01-081-13/+37
|\ \
| * | rpc method arguments should be dict, not listEric Windisch2013-01-081-13/+37
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | default arguments were being set to a list instead of a dict. This caused problems if the args key was missing in the msg argument to the call/cast methods. Adds tests to check if RPC cast/call work without arguments. Changes and documents the _test_cast method arguments, allowing for more flexibility and code reuse. fixes bug 1089750 Change-Id: I854dc3fcad8936695feb4414f3862672cf98c5d1
* | Merge "Support lookup of value using "group.key""Jenkins2013-01-081-0/+6
|\ \
| * | Support lookup of value using "group.key"Davanum Srinivas2013-01-021-0/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | Let us check if the opt_name has a '.', if it does then split it into a group/key and try lookup using that combination. Since LazyPluggable uses "CONF[self.__pivot]" if we just add this capability to cfg, we get "LazyPluggable doesn't support option groups" for free. Fixes LP #1093043 Change-Id: I9cedcf22014038e9fe4ed5e66ca5427aa99b5091
* | Merge "Add common base weigher/weigher handler for filter scheduler"Jenkins2013-01-072-0/+67
|\ \
| * | Add common base weigher/weigher handler for filter schedulerZhiteng Huang2013-01-042-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Filter scheduler is being used for more than one core projects (Nova and Cinder as of writing), the implementation shared a lot of common code. This patch is to move base weigher (weighing function), weigher handler for filter scheduler into oslo to reduce possible porting. implement bp: common-weights Change-Id: I2d1b37438663b53e035cc262875a283e5e2ee970
* | | Merge "Add common filter/filter handler for filter scheduler"Jenkins2013-01-073-0/+689
|\| |
| * | Add common filter/filter handler for filter schedulerZhiteng Huang2013-01-043-0/+689
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Filter scheduler is being used for more than one core projects (Nova and Cinder as of writing), the implementation shared a lot of common code. This patch moves base filter/filter handler class as well as common filter implementation for filter scheduler into oslo to reduce possible porting. implement bp: common-filters Change-Id: If0b1dee79c410c98e152230b55c1ec5dbcdef27c
* | | Eliminate sleep in the lockutils test case (across processes)Davanum Srinivas2013-01-071-32/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fork many processes and try to lock the same set of files using flock without blocking and make sure we wait for all the processes to finish as well. Fixes LP #1068316 Change-Id: I09964b2c5af63f31b5ddee1f18eaf646f8d8ba58
* | | Merge "Optionally add message envelope to notifications."Jenkins2013-01-062-4/+51
|\ \ \
| * | | Optionally add message envelope to notifications.Russell Bryant2013-01-032-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When message envelopes were added for rpc messages, notifications were explicitly left out. This was due to the fact that notifications are consumed outside of OpenStack. However, notification consumers will likely want to eventually start taking advantage of some of the features that the envelope is a prerequisite for, such as message signing. This patch adds a new notification driver that produces message based notifications including the message envelope. Related to blueprint version-rpc-messages. Change-Id: Iaa8b437e6b4f64053f4b02bf486516f60bb020e9
* | | | Merge "Fix test cases in tests.unit.test_service"Jenkins2013-01-051-28/+26
|\ \ \ \
| * | | | Fix test cases in tests.unit.test_serviceHengqing Hu2013-01-031-28/+26
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Be patient in test_service while waiting service to be spawned or killed, because: * Service spawning has a limit of one process a second. * A test server in the cloud might have limited resources, the time there might be several times slower. Change-Id: Idab1d1158ecc7564d0b1f9cdd32496496ff5b3f8
* | | | Merge "Make time comparison functions accept strings"Jenkins2013-01-041-8/+30
|\ \ \ \
| * | | | Make time comparison functions accept stringsDan Smith2013-01-041-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes is_older_than() and is_newer_than() accept timestamps in string format, as returned from strtime(). Change-Id: I1dbf453cc08bd8aaeb4fee2491a1e8aa74f8bee3