From 5c376126a2bef37c8c18043177d0b2dc1f54eed5 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 21 Aug 2014 15:49:24 +0200 Subject: [PATCH] Refresh rpc_backend values in unit tests to those from oslo.messaging Though old values are supported via compatibility transport aliases [1], it's better to stick to those values that are officially supported by oslo.messaging. [1]: neutron/common/rpc.py:TRANSPORT_ALIASES blueprint oslo-messaging Change-Id: I7bc03e323151cfdda2cb2bc4cd6f5aea9b87a746 --- neutron/tests/etc/neutron.conf.test | 2 +- neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py | 3 --- neutron/tests/unit/ibm/test_sdnve_agent.py | 3 --- neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py | 2 -- neutron/tests/unit/mlnx/test_mlnx_neutron_agent.py | 3 --- neutron/tests/unit/mlnx/test_mlnx_plugin_config.py | 2 -- neutron/tests/unit/nec/test_nec_agent.py | 2 -- neutron/tests/unit/ofagent/test_ofa_neutron_agent.py | 3 --- neutron/tests/unit/oneconvergence/test_nvsd_agent.py | 2 -- neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py | 6 ------ neutron/tests/unit/openvswitch/test_ovs_tunnel.py | 2 -- .../tests/unit/sriovnicagent/test_sriov_neutron_agent.py | 2 -- neutron/tests/unit/vmware/etc/neutron.conf.test | 2 +- 13 files changed, 2 insertions(+), 32 deletions(-) diff --git a/neutron/tests/etc/neutron.conf.test b/neutron/tests/etc/neutron.conf.test index 45f0e778f5..45fcf29411 100644 --- a/neutron/tests/etc/neutron.conf.test +++ b/neutron/tests/etc/neutron.conf.test @@ -18,7 +18,7 @@ api_extensions_path = unit/extensions api_paste_config = api-paste.ini.test # The messaging module to use, defaults to kombu. -rpc_backend = neutron.openstack.common.rpc.impl_fake +rpc_backend = fake lock_path = $state_path/lock diff --git a/neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py b/neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py index 49fc04c0e7..1de90d12fe 100644 --- a/neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py +++ b/neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py @@ -36,9 +36,6 @@ class TestHyperVNeutronAgent(base.BaseTestCase): def setUp(self): super(TestHyperVNeutronAgent, self).setUp() - # Avoid rpc initialization for unit tests - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') utilsfactory._get_windows_version = mock.MagicMock( return_value='6.2.0') diff --git a/neutron/tests/unit/ibm/test_sdnve_agent.py b/neutron/tests/unit/ibm/test_sdnve_agent.py index 3b33d901e6..085ec936d1 100644 --- a/neutron/tests/unit/ibm/test_sdnve_agent.py +++ b/neutron/tests/unit/ibm/test_sdnve_agent.py @@ -59,9 +59,6 @@ class TestSdnveNeutronAgent(base.BaseTestCase): notifier_cls = notifier_p.start() self.notifier = mock.Mock() notifier_cls.return_value = self.notifier - # Avoid rpc initialization for unit tests - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') cfg.CONF.set_override('integration_bridge', 'br_int', group='SDNVE') kwargs = sdnve_neutron_agent.create_agent_config_map(cfg.CONF) diff --git a/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py b/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py index 0c4661267d..adc3822db3 100644 --- a/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py +++ b/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py @@ -95,8 +95,6 @@ class TestLinuxBridgeAgent(base.BaseTestCase): super(TestLinuxBridgeAgent, self).setUp() # disable setting up periodic state reporting cfg.CONF.set_override('report_interval', 0, 'AGENT') - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') cfg.CONF.set_default('firewall_driver', 'neutron.agent.firewall.NoopFirewallDriver', group='SECURITYGROUP') diff --git a/neutron/tests/unit/mlnx/test_mlnx_neutron_agent.py b/neutron/tests/unit/mlnx/test_mlnx_neutron_agent.py index d8bd5abf63..fafbd5c56d 100644 --- a/neutron/tests/unit/mlnx/test_mlnx_neutron_agent.py +++ b/neutron/tests/unit/mlnx/test_mlnx_neutron_agent.py @@ -66,9 +66,6 @@ class TestEswitchAgent(base.BaseTestCase): def setUp(self): super(TestEswitchAgent, self).setUp() - # Avoid rpc initialization for unit tests - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') cfg.CONF.set_default('firewall_driver', 'neutron.agent.firewall.NoopFirewallDriver', group='SECURITYGROUP') diff --git a/neutron/tests/unit/mlnx/test_mlnx_plugin_config.py b/neutron/tests/unit/mlnx/test_mlnx_plugin_config.py index 90991a604c..581f622c1a 100644 --- a/neutron/tests/unit/mlnx/test_mlnx_plugin_config.py +++ b/neutron/tests/unit/mlnx/test_mlnx_plugin_config.py @@ -33,8 +33,6 @@ class TestMlnxPluginConfig(testlib_api.SqlTestCase): def setUp(self): super(TestMlnxPluginConfig, self).setUp() - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') cfg.CONF.set_override(group='MLNX', name='network_vlan_ranges', override=self.config_vlan_ranges) diff --git a/neutron/tests/unit/nec/test_nec_agent.py b/neutron/tests/unit/nec/test_nec_agent.py index 1bb7b64149..a2125e1929 100644 --- a/neutron/tests/unit/nec/test_nec_agent.py +++ b/neutron/tests/unit/nec/test_nec_agent.py @@ -39,8 +39,6 @@ class TestNecAgentBase(base.BaseTestCase): cfg.CONF.set_default('firewall_driver', 'neutron.agent.firewall.NoopFirewallDriver', group='SECURITYGROUP') - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') cfg.CONF.set_override('host', 'dummy-host') with contextlib.nested( mock.patch.object(ovs_lib.OVSBridge, 'get_datapath_id', diff --git a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py index 9336611a2d..e0bdaf709e 100644 --- a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py +++ b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py @@ -192,9 +192,6 @@ class TestOFANeutronAgent(ofa_test_base.OFAAgentTestBase): notifier_cls = notifier_p.start() self.notifier = mock.Mock() notifier_cls.return_value = self.notifier - # Avoid rpc initialization for unit tests - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') kwargs = self.mod_agent.create_agent_config_map(cfg.CONF) class MockFixedIntervalLoopingCall(object): diff --git a/neutron/tests/unit/oneconvergence/test_nvsd_agent.py b/neutron/tests/unit/oneconvergence/test_nvsd_agent.py index f04d2fecb1..d034755fbd 100644 --- a/neutron/tests/unit/oneconvergence/test_nvsd_agent.py +++ b/neutron/tests/unit/oneconvergence/test_nvsd_agent.py @@ -36,8 +36,6 @@ class TestOneConvergenceAgentBase(base.BaseTestCase): cfg.CONF.set_default('firewall_driver', 'neutron.agent.firewall.NoopFirewallDriver', group='SECURITYGROUP') - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') with contextlib.nested( mock.patch('neutron.openstack.common.loopingcall.' 'FixedIntervalLoopingCall'), diff --git a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py index b7e8f3c133..17da5960da 100644 --- a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py +++ b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py @@ -105,9 +105,6 @@ class TestOvsNeutronAgent(base.BaseTestCase): cfg.CONF.set_default('firewall_driver', 'neutron.agent.firewall.NoopFirewallDriver', group='SECURITYGROUP') - # Avoid rpc initialization for unit tests - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') kwargs = ovs_neutron_agent.create_agent_config_map(cfg.CONF) class MockFixedIntervalLoopingCall(object): @@ -1379,9 +1376,6 @@ class AncillaryBridgesTest(base.BaseTestCase): cfg.CONF.set_default('firewall_driver', 'neutron.agent.firewall.NoopFirewallDriver', group='SECURITYGROUP') - # Avoid rpc initialization for unit tests - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') cfg.CONF.set_override('report_interval', 0, 'AGENT') self.kwargs = ovs_neutron_agent.create_agent_config_map(cfg.CONF) diff --git a/neutron/tests/unit/openvswitch/test_ovs_tunnel.py b/neutron/tests/unit/openvswitch/test_ovs_tunnel.py index 8ddfa64be7..8da894ee0f 100644 --- a/neutron/tests/unit/openvswitch/test_ovs_tunnel.py +++ b/neutron/tests/unit/openvswitch/test_ovs_tunnel.py @@ -74,8 +74,6 @@ class TunnelTest(base.BaseTestCase): cfg.CONF.set_default('firewall_driver', 'neutron.agent.firewall.NoopFirewallDriver', group='SECURITYGROUP') - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') cfg.CONF.set_override('report_interval', 0, 'AGENT') self.INT_BRIDGE = 'integration_bridge' diff --git a/neutron/tests/unit/sriovnicagent/test_sriov_neutron_agent.py b/neutron/tests/unit/sriovnicagent/test_sriov_neutron_agent.py index ac078e267b..3a422ce8e9 100644 --- a/neutron/tests/unit/sriovnicagent/test_sriov_neutron_agent.py +++ b/neutron/tests/unit/sriovnicagent/test_sriov_neutron_agent.py @@ -29,8 +29,6 @@ class TestSriovAgent(base.BaseTestCase): super(TestSriovAgent, self).setUp() # disable setting up periodic state reporting cfg.CONF.set_override('report_interval', 0, 'AGENT') - cfg.CONF.set_override('rpc_backend', - 'neutron.openstack.common.rpc.impl_fake') cfg.CONF.set_default('firewall_driver', 'neutron.agent.firewall.NoopFirewallDriver', group='SECURITYGROUP') diff --git a/neutron/tests/unit/vmware/etc/neutron.conf.test b/neutron/tests/unit/vmware/etc/neutron.conf.test index 9eff4405d3..4fd0092bf0 100644 --- a/neutron/tests/unit/vmware/etc/neutron.conf.test +++ b/neutron/tests/unit/vmware/etc/neutron.conf.test @@ -18,7 +18,7 @@ bind_port = 9696 api_paste_config = api-paste.ini.test # The messaging module to use, defaults to kombu. -rpc_backend = neutron.openstack.common.rpc.impl_fake +rpc_backend = fake lock_path = $state_path/lock