Allow extra config files in unit tests

Fixes bug 1036669

Change-Id: Ic091ab012fbf6c80d2355806b6cd03a63fbfe4ca
This commit is contained in:
Salvatore Orlando 2012-08-14 03:01:29 -07:00 committed by Salvatore Orlando
parent 0ec3ef5003
commit 7f28401e1e

View File

@ -71,6 +71,9 @@ class QuantumDbPluginV2TestCase(unittest2.TestCase):
plugin = test_config.get('plugin_name_v2', DB_PLUGIN_KLASS) plugin = test_config.get('plugin_name_v2', DB_PLUGIN_KLASS)
# Create the default configurations # Create the default configurations
args = ['--config-file', etcdir('quantum.conf.test')] args = ['--config-file', etcdir('quantum.conf.test')]
# If test_config specifies some config-file, use it, as well
for config_file in test_config.get('config_files', []):
args.extend(['--config-file', config_file])
config.parse(args=args) config.parse(args=args)
# Update the plugin # Update the plugin
cfg.CONF.set_override('core_plugin', plugin) cfg.CONF.set_override('core_plugin', plugin)