]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Allow extra config files in unit tests
authorSalvatore Orlando <sorlando@nicira.com>
Tue, 14 Aug 2012 10:01:29 +0000 (03:01 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Tue, 14 Aug 2012 14:16:25 +0000 (07:16 -0700)
Fixes bug 1036669

Change-Id: Ic091ab012fbf6c80d2355806b6cd03a63fbfe4ca

quantum/tests/unit/test_db_plugin.py

index 52c4f3fe5baa140f5b9e022b0bef13eac99289f6..e2bb8c466e592b92c90faf9ac0cf98bfe4114ffd 100644 (file)
@@ -71,6 +71,9 @@ class QuantumDbPluginV2TestCase(unittest2.TestCase):
         plugin = test_config.get('plugin_name_v2', DB_PLUGIN_KLASS)
         # Create the default configurations
         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)
         # Update the plugin
         cfg.CONF.set_override('core_plugin', plugin)