Merge "Allow extra config files in unit tests"

This commit is contained in:
Jenkins 2012-08-14 21:38:22 +00:00 committed by Gerrit Code Review
commit 10005f6e65

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)