From: Henry Gessau Date: Mon, 28 Apr 2014 17:41:18 +0000 (-0400) Subject: Allow test_l3_agent unit test to run individually X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2a51109aecdfd10b153badbc0514948db10585c8;p=openstack-build%2Fneutron-build.git 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 --- diff --git a/neutron/tests/unit/test_l3_agent.py b/neutron/tests/unit/test_l3_agent.py index 20f3e42c7..1b3f231ed 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' )