]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Allow test_l3_agent unit test to run individually
authorHenry Gessau <gessau@cisco.com>
Mon, 28 Apr 2014 17:41:18 +0000 (13:41 -0400)
committerHenry Gessau <gessau@cisco.com>
Thu, 1 May 2014 04:49:54 +0000 (00:49 -0400)
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

index 20f3e42c798ffed10d7df046435828cdd8f2460c..1b3f231ed1cbc233bbacf4a0685eee97957f84ac 100644 (file)
@@ -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'
         )