The ironic.tests.unit.db.sqlalchemy.test_migrations
Module¶
Tests for database migrations. There are “opportunistic” tests for both mysql and postgresql in here, which allows testing against these databases in a properly configured unit test environment.
For the opportunistic testing you need to set up a db named ‘openstack_citest’ with user ‘openstack_citest’ and password ‘openstack_citest’ on localhost. The test will then use that db and u/p combo to run the tests.
For postgres on Ubuntu this can be done with the following commands:
sudo -u postgres psql
postgres=# create user openstack_citest with createdb login password
'openstack_citest';
postgres=# create database openstack_citest with owner openstack_citest;
-
class
ironic.tests.unit.db.sqlalchemy.test_migrations.
ModelsMigrationSyncMixin
[source]¶ Bases:
object
-
class
ironic.tests.unit.db.sqlalchemy.test_migrations.
ModelsMigrationsSyncMysql
(*args, **kwds)[source]¶ Bases:
ironic.tests.unit.db.sqlalchemy.test_migrations.ModelsMigrationSyncMixin
,oslo_db.sqlalchemy.test_migrations.ModelsMigrationsSync
,oslo_db.tests.sqlalchemy.base.MySQLOpportunisticTestCase
-
class
ironic.tests.unit.db.sqlalchemy.test_migrations.
ModelsMigrationsSyncPostgres
(*args, **kwds)[source]¶ Bases:
ironic.tests.unit.db.sqlalchemy.test_migrations.ModelsMigrationSyncMixin
,oslo_db.sqlalchemy.test_migrations.ModelsMigrationsSync
,oslo_db.tests.sqlalchemy.base.PostgreSQLOpportunisticTestCase
-
class
ironic.tests.unit.db.sqlalchemy.test_migrations.
TestMigrationsMySQL
(*args, **kwds)[source]¶ Bases:
ironic.tests.unit.db.sqlalchemy.test_migrations.MigrationCheckersMixin
,ironic.tests.unit.db.sqlalchemy.test_migrations.WalkVersionsMixin
,oslo_db.tests.sqlalchemy.base.MySQLOpportunisticTestCase
-
class
ironic.tests.unit.db.sqlalchemy.test_migrations.
TestMigrationsPostgreSQL
(*args, **kwds)[source]¶ Bases:
ironic.tests.unit.db.sqlalchemy.test_migrations.MigrationCheckersMixin
,ironic.tests.unit.db.sqlalchemy.test_migrations.WalkVersionsMixin
,oslo_db.tests.sqlalchemy.base.PostgreSQLOpportunisticTestCase
-
class
ironic.tests.unit.db.sqlalchemy.test_migrations.
TestWalkVersions
(*args, **kwargs)[source]¶ Bases:
ironic.tests.base.TestCase
,ironic.tests.unit.db.sqlalchemy.test_migrations.WalkVersionsMixin