Provision test environment for specific DB backends
Bases: object
Represent a particular database backend that may be provisionable.
The Backend object maintains a database type (e.g. database without specific driver type, such as “sqlite”, “postgresql”, etc.), a target URL, a base Engine for that URL object that can be used to provision databases and a BackendImpl which knows how to perform operations against this type of Engine.
Return an iterator of all Backend objects that are present
and provisionable.
Return the Backend for the given database type.
Create a database with the given name.
Return True if a database of the given name exists.
Drop all database objects.
Drops all database objects remaining on the default schema of the given engine.
Drop a database with the given name.
Given the URL of a particular database backend and the string
name of a particular ‘database’ within that backend, return an Engine instance whose connections will refer directly to the named database.
For hostname-based URLs, this typically involves switching just the ‘database’ portion of the URL with the given name and creating an engine.
For URLs that instead deal with DSNs, the rules may be more custom; for example, the engine may need to connect to the root URL and then emit a command to switch to the named database.
Bases: object
Provide database-specific implementations of key provisioning
functions.
BackendImpl is owned by a Backend instance which delegates to it for all database-specific features.
Return an iterator of all possible BackendImpl objects.
These are BackendImpls that are implemented, but not necessarily provisionable.
Create a database with the given name.
Produce a string url known as the ‘opportunistic’ URL.
This URL is one that corresponds to an established Openstack convention for a pre-established database login, which, when detected as available in the local environment, is automatically used as a test platform for a specific type of driver.
Drop all database objects.
Drops all database objects remaining on the default schema of the given engine.
Per-db implementations will also need to drop items specific to those systems, such as sequences, custom types (e.g. pg ENUM), etc.
Drop a database with the given name.
Return a provisioned engine.
Given the URL of a particular database backend and the string name of a particular ‘database’ within that backend, return an Engine instance whose connections will refer directly to the named database.
For hostname-based URLs, this typically involves switching just the ‘database’ portion of the URL with the given name and creating an engine.
For URLs that instead deal with DSNs, the rules may be more custom; for example, the engine may need to connect to the root URL and then emit a command to switch to the named database.
Bases: testresources.TestResourceManager
Bases: testresources.TestResourceManager
Bases: object
Bases: object