From: Ihar Hrachyshka Date: Thu, 21 Aug 2014 13:49:24 +0000 (+0200) Subject: Refresh rpc_backend values in unit tests to those from oslo.messaging X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d8f0539151c374d4529505c821ffb14a621520e6;p=openstack-build%2Fneutron-build.git 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 --- diff --git a/neutron/tests/etc/neutron.conf.test b/neutron/tests/etc/neutron.conf.test index 45f0e778f..45fcf2941 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 49fc04c0e..1de90d12f 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 3b33d901e..085ec936d 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 0c4661267..adc3822db 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 d8bd5abf6..fafbd5c56 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 90991a604..581f622c1 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 1bb7b6414..a2125e192 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 9336611a2..e0bdaf709 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 f04d2fecb..d034755fb 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 b7e8f3c13..17da5960d 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 8ddfa64be..8da894ee0 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 ac078e267..3a422ce8e 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 9eff4405d..4fd0092bf 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