RETIRED, Part of OpenStack's Oslo project. New Oslo APIs go through an incubation phase in this repository before being released as part of a proper Python library.
Go to file
Roman Podoliaka 11273cfe53 Prevent races in opportunistic db test cases
Opportunistic db test cases create schemas on demand, so that each
test case which inherits the base test case class, will get its own
db schema (i. e. races between tests are not possible).

In order to do schema provisioning we have to connect to RDBMS server
first. So far we've been connecting to the openstack_citest database,
which is guaranteed to exist on CI nodes. It turns out, there are a
few test cases in Nova (maybe in other projects as well), that drop
and recreate the openstack_citest database. If they happen to do that
when the opportunistic db fixture is in the middle of provisioning a
schema, those tests will fail (as there is an an open session to the
database and thus it can't be dropped).

This can be solved easily by changing the way we provision new
schemas in opportunistic db test cases as actually, we don't have to
connect to the openstack_citest database at all:

 - for MySQL we can use an empty db name to connect to MySQL server,
   but not to a particular database
 - PostgreSQL requires us to specify the database name. We can use
   the service postgres database here (PostgreSQL shell utils such
   as createdb, createuser, etc use it for the very same reason)

Closes-Bug: #1328997

Change-Id: Id82090743e8b93f6c960de066fd05d8a2f9fb934
2014-06-13 14:41:39 +03:00
doc/source Add source code generation to conf.py 2014-06-04 19:27:44 +02:00
etc Remove rootwrap from incubator 2014-02-14 14:35:39 +01:00
openstack Prevent races in opportunistic db test cases 2014-06-13 14:41:39 +03:00
pypi Rename Openstack to OpenStack 2014-02-13 16:05:04 +08:00
tests Merge "Don't slugify names that don't exist" 2014-06-11 11:45:46 +00:00
tools Merge "Commit changes to local repository after exporting" 2014-06-11 11:45:39 +00:00
.coveragerc Update .coveragerc 2013-02-06 16:47:06 +02:00
.gitignore Remove requirements.txt from .gitignore 2014-03-06 17:03:31 +02:00
.gitreview Correcting openstack-common mv to oslo-incubator. 2012-11-11 23:44:12 +00:00
.mailmap Add mailmap entry 2014-05-07 12:12:00 -07:00
.testr.conf Don't call provision.py directly 2014-04-07 14:56:04 +10:00
HACKING.rst Update URL for global HACKING document 2013-11-11 10:36:08 -08:00
LICENSE Incorporating MIT licensed code 2013-12-02 11:57:19 +00:00
MAINTAINERS Update the status of gettextutils to graduating 2014-04-29 11:23:46 -07:00
MANIFEST.in Don't include versioninfo in manifest. 2013-01-14 03:17:32 -08:00
README.rst Fixes command being displayed on same line. 2014-04-04 23:09:48 +05:30
TESTING.rst Creates a new file TESTING.rst. 2013-06-20 20:44:43 -04:00
obsolete.txt Warn the user when they sync an obsolete module 2014-04-12 17:08:51 +08:00
requirements-py3.txt Move oslotest to test-only requires 2014-05-30 12:59:37 +02:00
requirements.txt Merge "Updated from global requirements" 2014-05-30 23:26:49 +00:00
run_tests.sh Move `./run_tests.sh` to Oslo 2013-08-13 18:06:11 +03:00
setup.cfg Set pbr 'warnerrors' option for doc build 2014-06-06 12:07:47 +02:00
setup.py Updated from global requirements 2014-05-09 02:28:23 +00:00
test-requirements-py3.txt Use moxstubout and mockpatch from oslotest 2014-06-02 10:24:12 +03:00
test-requirements.txt Use moxstubout and mockpatch from oslotest 2014-06-02 10:24:12 +03:00
tox.ini Add source code generation to conf.py 2014-06-04 19:27:44 +02:00
update.py remove default=None for config options 2014-05-28 09:10:51 +02:00
update.sh Fix typo in update.py 2013-12-30 13:00:22 +08:00

README.rst

The Oslo Incubator

The Oslo program produces a set of python libraries containing infrastructure code shared by OpenStack projects. The APIs provided by these libraries should be high quality, stable, consistent and generally useful.

The process of developing a new Oslo API usually begins by taking code which is common to some OpenStack projects and moving it into this repository. Incubation shouldn't be seen as a long term option for any API - it is merely a stepping stone to inclusion into a published Oslo library.

For more information, see our wiki page:

https://wiki.openstack.org/wiki/Oslo

Running Tests

To run tests in virtualenvs (preferred):

sudo pip install tox
tox

To run tests in the current environment:

sudo pip install -r requirements.txt
nosetests

To run tests using MySQL or PostgreSQL as a DB backend do:

OS_TEST_DBAPI_ADMIN_CONNECTION=mysql://user:password@host/database tox -e py27

Note, that your DB user must have permissions to create and drop databases.