Fix test_router_add_interface_delete_port_after_failure

In test_router_add_interface_delete_port_after_failure,
when a subnet is created, a neutron DHCP port could be created
if this subnet is DHCP-enabled.

In this case, the test will fail because it only checks if a
router-interface port is deleted and expects no more port in
the system. But it misses the internal DHCP port is still there.

The patch here is to explicitly set enable_dhcp=False when
creating the subnet.

Change-Id: I4acbf2c83f9145f7b99519ec90934fa862de67f7
Closes-Bug: #1612894
This commit is contained in:
Shih-Hao Li
2016-08-12 11:59:38 -07:00
parent fed5e76092
commit aa52367f78

View File

@@ -1242,7 +1242,7 @@ class L3NatTestCaseBase(L3NatTestCaseMixin):
p['port']['id'])
def test_router_add_interface_delete_port_after_failure(self):
with self.router() as r, self.subnet() as s:
with self.router() as r, self.subnet(enable_dhcp=False) as s:
plugin = manager.NeutronManager.get_plugin()
# inject a failure in the update port that happens at the end
# to ensure the port gets deleted