Merge "Fixing db properties for testing purposes"

This commit is contained in:
Jenkins 2014-09-19 05:57:37 +00:00 committed by Gerrit Code Review
commit 445af82e21
2 changed files with 14 additions and 8 deletions

View File

@ -140,6 +140,8 @@ function configure_mistral {
# Configure the database.
iniset $MISTRAL_CONF_FILE database connection `database_connection_url mistral`
iniset $MISTRAL_CONF_FILE database max_overflow -1
iniset $MISTRAL_CONF_FILE database max_pool_size 1000
# Configure keystone auth url
iniset $MISTRAL_CONF_FILE keystone_authtoken auth_uri "http://${KEYSTONE_AUTH_HOST}:5000/v3"

View File

@ -189,8 +189,12 @@ class DbTestCase(BaseTest):
and can be extended by child classes.
"""
cfg.CONF.set_default('connection', 'sqlite://', group='database')
cfg.CONF.set_default('max_overflow', -1, group='database')
cfg.CONF.set_default('max_pool_size', 1000, group='database')
db_api_v1.setup_db()
db_api_v2.setup_db()
action_manager.sync_db()
def _clean_db(self):
@ -210,15 +214,15 @@ class DbTestCase(BaseTest):
super(DbTestCase, self).setUp()
self.__heavy_init()
cfg.CONF.set_default('connection', 'sqlite://', group='database')
db_api_v1.setup_db()
db_api_v2.setup_db()
self.ctx = auth_context.MistralContext(user_id='1-2-3-4',
self.ctx = auth_context.MistralContext(
user_id='1-2-3-4',
project_id='5-6-7-8',
user_name='test-user',
project_name='test-project',
is_admin=False)
is_admin=False
)
auth_context.set_ctx(self.ctx)
self.addCleanup(auth_context.set_ctx, None)