From 0d837a4be245f6024a6b26727c7c7c0edc6029c5 Mon Sep 17 00:00:00 2001 From: Henry Gessau Date: Fri, 13 May 2016 21:28:57 -0400 Subject: [PATCH] Remove unhelpful test of oslo.service ServiceLauncher Change https://review.openstack.org/315498 was rushed in to fix the gate breakage, but reviewers correctly noted that the test does not belong in Neutron. Change-Id: I25426aae53932459d732ba560733f04d70ea03ac --- neutron/tests/unit/agent/dhcp/test_agent.py | 25 --------------------- 1 file changed, 25 deletions(-) diff --git a/neutron/tests/unit/agent/dhcp/test_agent.py b/neutron/tests/unit/agent/dhcp/test_agent.py index 7ab5780c217..c9ba5478cec 100644 --- a/neutron/tests/unit/agent/dhcp/test_agent.py +++ b/neutron/tests/unit/agent/dhcp/test_agent.py @@ -272,31 +272,6 @@ class TestDhcpAgent(base.BaseTestCase): mock.call().report_state(mock.ANY, mock.ANY, mock.ANY)]) - def test_dhcp_agent_main_agent_manager(self): - logging_str = 'neutron.agent.common.config.setup_logging' - launcher_str = 'oslo_service.service.ServiceLauncher' - with mock.patch(logging_str): - with mock.patch.object(sys, 'argv') as sys_argv: - with mock.patch(launcher_str) as launcher: - sys_argv.return_value = ['dhcp', '--config-file', - base.etcdir('neutron.conf')] - entry.main() - # The signature of ServiceLauncher has changed with - # oslo.service===1.10.0, so we allow for this variant - # here, too. - # TODO(frickler): Fix this test case to not depend on - # oslo.service internals. - if launcher.mock_calls[0][2]: - launcher.assert_has_calls( - [mock.call(cfg.CONF, restart_method='reload'), - mock.call().launch_service(mock.ANY, workers=1), - mock.call().wait()]) - else: - launcher.assert_has_calls( - [mock.call(cfg.CONF), - mock.call().launch_service(mock.ANY), - mock.call().wait()]) - def test_run_completes_single_pass(self): with mock.patch(DEVICE_MANAGER): dhcp = dhcp_agent.DhcpAgent(HOSTNAME)