From: Jenkins Date: Tue, 19 Aug 2014 08:12:42 +0000 (+0000) Subject: Merge "Skip FWaaS config mismatch check if RPC method is unsupported" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0954a7a0b33e7e56e0fee95b38df3455ab70173a;p=openstack-build%2Fneutron-build.git Merge "Skip FWaaS config mismatch check if RPC method is unsupported" --- 0954a7a0b33e7e56e0fee95b38df3455ab70173a diff --cc neutron/tests/unit/test_l3_agent.py index 664b6e8c8,d64bf2e0d..6f15e9c02 --- a/neutron/tests/unit/test_l3_agent.py +++ b/neutron/tests/unit/test_l3_agent.py @@@ -2041,9 -1946,23 +2043,23 @@@ class TestBasicRouterOperations(base.Ba self.mock_ip.del_veth.assert_called_once_with( agent.get_fip_int_device_name(router['id'])) self.mock_ip_dev.route.delete_gateway.assert_called_once_with( - '11.22.33.42', table=16) + str(fip_to_rtr.ip), table=16) f.assert_called_once_with(fip_ns_name) + def test_get_service_plugin_list(self): + service_plugins = [p_const.L3_ROUTER_NAT] + self.plugin_api.get_service_plugin_list.return_value = service_plugins + agent = l3_agent.L3NATAgent(HOSTNAME, self.conf) + self.assertEqual(service_plugins, agent.neutron_service_plugins) + self.assertTrue(self.plugin_api.get_service_plugin_list.called) + + def test_get_service_plugin_list_failed(self): + raise_rpc = n_rpc.RemoteError() + self.plugin_api.get_service_plugin_list.side_effect = raise_rpc + agent = l3_agent.L3NATAgent(HOSTNAME, self.conf) + self.assertIsNone(agent.neutron_service_plugins) + self.assertTrue(self.plugin_api.get_service_plugin_list.called) + class TestL3AgentEventHandler(base.BaseTestCase):