The nova.tests.test_migrations Module

Tests for database migrations. This test case reads the configuration file test_migrations.conf for database connection settings to use in the tests. For each connection found in the config file, the test case runs a series of test cases to ensure that migrations work properly both upgrading and downgrading, and that no data loss occurs if possible.

class TestMigrations(methodName='runTest')

Bases: nova.test.TestCase

Test sqlalchemy-migrate migrations

CONFIG_FILE_PATH = '/build/buildd/nova-2012.2/nova/tests/test_migrations.conf'
DEFAULT_CONFIG_FILE = '/build/buildd/nova-2012.2/nova/tests/test_migrations.conf'
MIGRATE_FILE = '/build/buildd/nova-2012.2/nova/db/sqlalchemy/migrate_repo/__init__.py'
REPOSITORY = <migrate.versioning.repository.Repository object at 0x160a1f8c>
TEST_DATABASES = {}
setUp()
tearDown()
test_migration_111()
test_migration_133()
test_migration_91()

Test that migration 91 works correctly.

This test prevents regression of bugs 1052244 and 1052220.

test_migration_98()

Test that migration 98 runs

This test exists to prove bug 1047633 has been fixed

test_mysql_connect_fail()

Test that we can trigger a mysql connection failure and we fail gracefully to ensure we don’t break people without mysql

test_mysql_innodb(*args, **kw)

Test that table creation on mysql only builds InnoDB tables

test_walk_versions()

Walks all version scripts for each tested database, ensuring that there are no errors in the version scripts for each engine

Previous topic

The nova.tests.test_metadata Module

Next topic

The nova.tests.test_misc Module

This Page