]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Clean up test_dvr_router_rem_fips_on_restarted_agent
authorAssaf Muller <amuller@redhat.com>
Tue, 11 Aug 2015 18:20:07 +0000 (14:20 -0400)
committerAssaf Muller <amuller@redhat.com>
Tue, 11 Aug 2015 18:23:08 +0000 (14:23 -0400)
* self._add_fip wasn't actually doing anything useful, it just
  throws off the reader by making him/her think that line is
  important when it isn't.
* Added an assertion that checks that the FIP namespace exists
  before the reconfiguration of the router.

Change-Id: Ifd27f20d9d8d11575212b95e3bbe534bfe2d3b8f

neutron/tests/functional/agent/test_l3_agent.py

index ef2bd498ed8bb750d3b97b4c9416e410d139742a..18b8c3347e2775f83f5d6db295a2d38d3e5e73ed 100644 (file)
@@ -1276,8 +1276,8 @@ class TestDvrRouter(L3AgentTestFramework):
         self.agent.conf.agent_mode = 'dvr_snat'
         router_info = self.generate_dvr_router_info()
         router1 = self.manage_router(self.agent, router_info)
-        self._add_fip(router1, '192.168.111.12', self.agent.conf.host)
         fip_ns = router1.fip_ns.get_name()
+        self.assertTrue(self._namespace_exists(fip_ns))
         restarted_agent = neutron_l3_agent.L3NATAgentWithStateReport(
             self.agent.host, self.agent.conf)
         router1.router[l3_constants.FLOATINGIP_KEY] = []