From 1fe72ad84329900cabf7c2ed0184a4d48029fe50 Mon Sep 17 00:00:00 2001 From: Morgan Fainberg Date: Tue, 25 Mar 2014 13:40:24 -0700 Subject: [PATCH] Use in-memory SQLite for sql migration tests Use the new in-memory SQLite support for the migration tests by default. Change-Id: I3ef3a6ff5442ebbad039ddb7936095c389454a9e --- keystone/tests/test_sql_upgrade.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keystone/tests/test_sql_upgrade.py b/keystone/tests/test_sql_upgrade.py index 86533dd713..32223853b3 100644 --- a/keystone/tests/test_sql_upgrade.py +++ b/keystone/tests/test_sql_upgrade.py @@ -71,12 +71,14 @@ class SqlMigrateBase(tests.SQLDriverOverrides, tests.TestCase): def setUp(self): super(SqlMigrateBase, self).setUp() conn_str = CONF.database.connection - if (conn_str.startswith('sqlite') and + if (conn_str != tests.IN_MEM_DB_CONN_STRING and + conn_str.startswith('sqlite') and conn_str[10:] == tests.DEFAULT_TEST_DB_FILE): # Override the default with a DB that is specific to the migration # tests only if the DB Connection string is the same as the global # default. This is required so that no conflicts occur due to the - # global default DB already being under migrate control. + # global default DB already being under migrate control. This is + # only needed if the DB is not-in-memory db_file = tests.dirs.tmp('keystone_migrate_test.db') self.config_fixture.config( group='database',