Fix tests on Neutron port behavior
Fix some integration tests checking port behavior, as the assumptions we
were making were wrong, and that changed recently.
Closes-Bug: #1591177
Change-Id: I4338eee40d092148831b3e20f8a42a1b3d3ea8bf
diff --git a/functional/test_create_update_neutron_port.py b/functional/test_create_update_neutron_port.py
index 575d21c..2109012 100644
--- a/functional/test_create_update_neutron_port.py
+++ b/functional/test_create_update_neutron_port.py
@@ -26,6 +26,7 @@
subnet:
type: OS::Neutron::Subnet
properties:
+ enable_dhcp: false
network: { get_resource: net }
cidr: 11.11.11.0/24
port:
@@ -50,9 +51,6 @@
class UpdatePortTest(functional_base.FunctionalTestsBase):
- def setUp(self):
- super(UpdatePortTest, self).setUp()
-
def get_port_id_and_ip(self, stack_identifier):
resources = self.client.resources.list(stack_identifier)
port_id = [res.physical_resource_id for res in resources
@@ -72,9 +70,8 @@
self.update_stack(stack_identifier, templ_no_ip,
parameters=parameters)
- new_id, new_ip = self.get_port_id_and_ip(stack_identifier)
- # port id and ip should be different
- self.assertNotEqual(_ip, new_ip)
+ new_id, _ = self.get_port_id_and_ip(stack_identifier)
+ # port id should be different
self.assertNotEqual(_id, new_id)
def test_stack_update_replace_with_ip(self):
@@ -161,6 +158,5 @@
self.update_stack(stack_identifier, templ_no_ip)
new_id, new_ip = self.get_port_id_and_ip(stack_identifier)
- # port should be updated with the same id, but different ip
- self.assertNotEqual(_ip, new_ip)
+ # port should be updated with the same id
self.assertEqual(_id, new_id)