Comment 0 for bug 1156696

Revision history for this message
Alexej Ababilov (aababilov) wrote :

TestDhcpAgentEventHandler tests cannot be run independently:

$ nosetests quantum.tests.unit.test_dhcp_agent:TestDhcpAgentEventHandler|&head
quantum.tests.unit.test_dhcp_agent.TestDhcpAgentEventHandler.test_disable_dhcp_helper_driver_failure ... ERROR
quantum.tests.unit.test_dhcp_agent.TestDhcpAgentEventHandler.test_disable_dhcp_helper_known_network ... ERROR
quantum.tests.unit.test_dhcp_agent.TestDhcpAgentEventHandler.test_disable_dhcp_helper_unknown_network ... ERROR
quantum.tests.unit.test_dhcp_agent.TestDhcpAgentEventHandler.test_disable_isolated_metadata_proxy ... ERROR

...

======================================================================
ERROR: quantum.tests.unit.test_dhcp_agent.TestDhcpAgentEventHandler.test_disable_dhcp_helper_driver_failure
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/tmp/yahoo/quantum/quantum/tests/unit/test_dhcp_agent.py", line 426, in setUp
    self.dhcp = dhcp_agent.DhcpAgent(HOSTNAME)
  File "/tmp/yahoo/quantum/quantum/agent/dhcp_agent.py", line 82, in __init__
    self._populate_networks_cache()
  File "/tmp/yahoo/quantum/quantum/agent/dhcp_agent.py", line 90, in _populate_networks_cache
    self.root_helper
  File "/tmp/yahoo/quantum/quantum/agent/linux/dhcp.py", line 228, in existing_dhcp_networks
    confs_dir = os.path.abspath(os.path.normpath(conf.dhcp_confs))
  File "/tmp/yahoo/.venv/lib/python2.6/site-packages/oslo/config/cfg.py", line 1191, in __getattr__
    return self._get(name)
  File "/tmp/yahoo/.venv/lib/python2.6/site-packages/oslo/config/cfg.py", line 1513, in _get
    value = self._substitute(self._do_get(name, group))
  File "/tmp/yahoo/.venv/lib/python2.6/site-packages/oslo/config/cfg.py", line 1529, in _do_get
    info = self._get_opt_info(name, group)
  File "/tmp/yahoo/.venv/lib/python2.6/site-packages/oslo/config/cfg.py", line 1629, in _get_opt_info
    raise NoSuchOptError(opt_name, group)
NoSuchOptError: no such option: dhcp_confs

These tests require importing an option from quantum.agent.linux.dhcp module.