diff --git a/neutron/tests/fullstack/test_segmentation_id.py b/neutron/tests/fullstack/test_segmentation_id.py index 61759474b41..76629fb05c6 100644 --- a/neutron/tests/fullstack/test_segmentation_id.py +++ b/neutron/tests/fullstack/test_segmentation_id.py @@ -74,33 +74,32 @@ class TestSegmentationId(BaseSegmentationIdTest): ] num_hosts = 1 - def test_change_segmentation_id_no_ports_in_network(self): - network = self._create_network() - # Now change segmentation_id to some other value - self._update_segmentation_id(network) - - def test_change_segmentation_id_with_unbound_ports_in_network(self): + def test_change_segmentation_id(self): network = self._create_network() + # Now change segmentation_id to some other value when there are no + # ports created in network + network = self._update_segmentation_id(network) self.safe_client.create_subnet( self.project_id, network['id'], '20.0.0.0/24') + # Create some unbound and binding_failed ports # Unbound port self.safe_client.create_port(self.project_id, network['id']) # Port failed to bind self.safe_client.create_port(self.project_id, network['id'], "non-existing-host") - self._update_segmentation_id(network) + # Test update segmentation_id to some othe value with unbound and + # binding_failed ports created in the network + network = self._update_segmentation_id(network) - def test_change_segmentation_id_with_bound_ports_in_network(self): - network = self._create_network() - - self.safe_client.create_subnet( - self.project_id, network['id'], '20.0.0.0/24') + # Create bound port self.safe_client.create_port(self.project_id, network['id'], self.environment.hosts[0].hostname) + # Test update segmentation_id to some othe value when bound ports are + # created in the network self._update_segmentation_id(network)