f2a28b36fe
This patch fixes bug 938637 Quantum unittests doesn't pass with plugin (openvswitch, linuxbridge) in venv as follows. This is because config file under <quantum src>/etc/ can't be find due to FLAGS.state_path points to <python-quantumclient src> which can be different from <quantum src>. Set FLAGS.state_path to <quantum src> when quantum unit tests. $ PLUGIN_DIR=quantum/plugins/openvswitch ./run_tests.sh -V <snip> ActionExtensionTest test_extended_action_for_adding_extra_data (quantum.tests.unit.test_extensions.ActionExtensionTest)ERROR <snip> ====================================================================== ERROR: test_extended_action_for_adding_extra_data (quantum.tests.unit.test_extensions.ActionExtensionTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/quantum/tests/unit/test_extensions.py", line 212, in setUp self.extension_app = setup_extensions_test_app() File "/quantum-src/quantum/tests/unit/test_extensions.py", line 474, in setup_extensions_test_app return TestApp(setup_extensions_middleware(extension_manager)) File "/quantum-src/quantum/tests/unit/test_extensions.py", line 469, in setup_extensions_middleware conf, app = config.load_paste_app('extensions_test_app', options, None) File "/quantum-src/.venv/src/python-quantumclient/quantum/common/config.py", line 316, in load_paste_app conf_file, conf = load_paste_config(app_name, options, args) File "/quantum-src/.venv/src/python-quantumclient/quantum/common/config.py", line 286, in load_paste_config "Cannot load application %s" % app_name) RuntimeError: Unable to locate any configuration file. Cannot load application extensions_test_app -------------------- >> begin captured logging << -------------------- quantum.extensions.extensions: INFO: Initializing extension manager. quantum.extensions.extensions: INFO: Loading extension file: foxinsocks.py quantum.extensions.extensions: DEBUG: Ext name: Fox In Socks quantum.extensions.extensions: DEBUG: Ext alias: FOXNSOX quantum.extensions.extensions: DEBUG: Ext description: The Fox In Socks Extension quantum.extensions.extensions: DEBUG: Ext namespace: http://www.fox.in.socks/api/ext/pie/v1.0 quantum.extensions.extensions: DEBUG: Ext updated: 2011-01-22T13:25:27-06:00 quantum.extensions.extensions: WARNING: Loaded extension: FOXNSOX quantum.extensions.extensions: INFO: Loading extension file: __init__.py quantum.extensions.extensions: INFO: Loading extension file: foxinsocks.pyc quantum.extensions.extensions: INFO: Loading extension file: __init__.pyc --------------------- >> end captured logging << --------------------- Change-Id: I3b8e1414b22b1a526468488fe885ac39f2e6c420 |
||
---|---|---|
.. | ||
unit | ||
__init__.py |