]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Allow tests in TestDhcpAgentEventHandler run independently
authorAlessio Ababilov <aababilo@yahoo-inc.com>
Mon, 18 Mar 2013 16:48:30 +0000 (18:48 +0200)
committerAlessio Ababilov <aababilo@yahoo-inc.com>
Mon, 18 Mar 2013 16:48:30 +0000 (18:48 +0200)
Tests in TestDhcpAgentEventHandler depend on dhcp_confs
option that is defined in quantum.agent.linux.dhcp. We have
to register the option in order to allow independent testing.

This problem is similar to bug #1125951.

Fixes: bug #1156696
Change-Id: I323908c6f70697e056294b1817ff32ce5d32b32c

quantum/tests/unit/test_dhcp_agent.py

index 46a6bdb9fa73499cee91efd9a3b2e3f2b2f97ac3..d051dedc42c4493b22f991af937ad9eb3a73d39e 100644 (file)
@@ -408,6 +408,7 @@ class TestDhcpAgentEventHandler(base.BaseTestCase):
         super(TestDhcpAgentEventHandler, self).setUp()
         cfg.CONF.register_opts(dhcp_agent.DeviceManager.OPTS)
         cfg.CONF.register_opts(dhcp_agent.DhcpLeaseRelay.OPTS)
+        cfg.CONF.register_opts(dhcp.OPTS)
         cfg.CONF.set_override('interface_driver',
                               'quantum.agent.linux.interface.NullDriver')
         config.register_root_helper(cfg.CONF)