glare.tests.unit.db.migrations package¶
Submodules¶
glare.tests.unit.db.migrations.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
glare.tests.unit.db.migrations.test_migrations.
TestMigrationsMySQL
(*args, **kwds)[source]¶ Bases:
glare.tests.unit.db.migrations.test_migrations.GlareMigrationsCheckers
,glare.tests.unit.db.migrations.test_migrations.WalkVersionsMixin
,oslo_db.tests.sqlalchemy.base.MySQLOpportunisticTestCase
-
class
glare.tests.unit.db.migrations.test_migrations.
TestMigrationsPostgreSQL
(*args, **kwds)[source]¶ Bases:
glare.tests.unit.db.migrations.test_migrations.GlareMigrationsCheckers
,glare.tests.unit.db.migrations.test_migrations.WalkVersionsMixin
,oslo_db.tests.sqlalchemy.base.PostgreSQLOpportunisticTestCase
-
class
glare.tests.unit.db.migrations.test_migrations.
TestMigrationsSqlite
(*args, **kwds)[source]¶ Bases:
glare.tests.unit.db.migrations.test_migrations.GlareMigrationsCheckers
,glare.tests.unit.db.migrations.test_migrations.WalkVersionsMixin
,oslo_db.tests.sqlalchemy.base.DbTestCase