Previous topic

The cinder.tests.test_iscsi Module

Next topic

The cinder.tests.test_misc Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Cinder 2011.2 docs or all OpenStack docs too.

The cinder.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: cinder.test.TestCase

Test sqlalchemy-migrate migrations

CONFIG_FILE_PATH = '/home/abuild/rpmbuild/BUILD/cinder-2012.2.4/cinder/tests/test_migrations.conf'
DEFAULT_CONFIG_FILE = '/home/abuild/rpmbuild/BUILD/cinder-2012.2.4/cinder/tests/test_migrations.conf'
MIGRATE_FILE = '/home/abuild/rpmbuild/BUILD/cinder-2012.2.4/cinder/db/sqlalchemy/migrate_repo/__init__.py'
REPOSITORY = <migrate.versioning.repository.Repository object at 0xf3ee8a6c>
TEST_DATABASES = {}
setUp()
tearDown()
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