From 0431ab0c37e3cbce8568d8a79a87054a1be6d3ae Mon Sep 17 00:00:00 2001 From: Henry Gessau Date: Mon, 28 Apr 2014 13:41:18 -0400 Subject: [PATCH] Allow test_l3_agent unit test to run individually When the test_l3_agent.TestL3AgentEventHandler test case is run after test discovery it passes because discovery imports files that registers all the config options. For the test case to run individually we need to explicitly register the config options used in the test. Change-Id: Ic31503ad7be8601ff843dbdc8edf5856ce8b0e39 Closes-bug: #1313812 --- neutron/tests/unit/test_l3_agent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neutron/tests/unit/test_l3_agent.py b/neutron/tests/unit/test_l3_agent.py index 20f3e42c79..1b3f231ed1 100644 --- a/neutron/tests/unit/test_l3_agent.py +++ b/neutron/tests/unit/test_l3_agent.py @@ -1200,6 +1200,8 @@ class TestL3AgentEventHandler(base.BaseTestCase): def setUp(self): super(TestL3AgentEventHandler, self).setUp() cfg.CONF.register_opts(l3_agent.L3NATAgent.OPTS) + agent_config.register_interface_driver_opts_helper(cfg.CONF) + agent_config.register_use_namespaces_opts_helper(cfg.CONF) cfg.CONF.set_override( 'interface_driver', 'neutron.agent.linux.interface.NullDriver' )