oslo.db/oslo
Mike Bayer 4e19870fd4 Reorganize DbTestCase to use provisioning completely
This change is the first part in a series of changes
that will allow for full flexibility in database usage
during tests.  The first step is to add more facility
to the oslo.db.sqlalchemy.provision system, implementing
a dispatch system that allows flexibility in creation
and dropping of databases, as well as moving the awareness
of the "openstack_citest" convention into provisioning.
The OpportunisticFixture and OpportunisticTestCase now
fold into DbFixture and DbTestCase, which defers in a simple
way to provision.ProvisionedDatabase for all connectivity.
ProvisionedDatabase in turn decides based on the given
environment as to how an engine should be provisioned
for a given test.

Control of database connectivity remains via the
OS_TEST_DBAPI_ADMIN_CONNECTION environment variable.  When not
set, connectivity defaults to sqlite://, plus those backends
found to be available using "opportunistic" naming conventions.
When the variable is present, it provides a semicolon-delimited
list of URLs, and only those URLs will be used for initial
connectivity.

Future changes will allow provisioning to hold onto a single
database engine per test run, as well as allow a single
test class to run in multiple backend scenarios (e.g. one test
against many different backends).

Change-Id: Ifc02505c4c8ebd4a1ca56e14f76c0989576875c3
Partial-Bug: #1339206
2014-10-22 13:02:20 -04:00
..
db Reorganize DbTestCase to use provisioning completely 2014-10-22 13:02:20 -04:00
__init__.py Remove extraneous vim editor configuration comments 2014-10-08 22:46:07 +02:00