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;
Bases: object
Bases: object
Bases: ironic.tests.unit.db.sqlalchemy.test_migrations.ModelsMigrationSyncMixin, oslo_db.sqlalchemy.test_migrations.ModelsMigrationsSync, oslo_db.sqlalchemy.test_base.MySQLOpportunisticTestCase
Bases: ironic.tests.unit.db.sqlalchemy.test_migrations.ModelsMigrationSyncMixin, oslo_db.sqlalchemy.test_migrations.ModelsMigrationsSync, oslo_db.sqlalchemy.test_base.PostgreSQLOpportunisticTestCase
Bases: ironic.tests.unit.db.sqlalchemy.test_migrations.MigrationCheckersMixin, ironic.tests.unit.db.sqlalchemy.test_migrations.WalkVersionsMixin, oslo_db.sqlalchemy.test_base.MySQLOpportunisticTestCase
Bases: ironic.tests.unit.db.sqlalchemy.test_migrations.MigrationCheckersMixin, ironic.tests.unit.db.sqlalchemy.test_migrations.WalkVersionsMixin, oslo_db.sqlalchemy.test_base.PostgreSQLOpportunisticTestCase
Bases: ironic.tests.base.TestCase, ironic.tests.unit.db.sqlalchemy.test_migrations.WalkVersionsMixin