[Fullstack] Consolidate segmentation_id update tests into single test
There were 3 tests which were testing update of the segmentation_id for
the network with:
* no ports
* unbound or binding failed ports,
* bound ports.
Due to the nature of the fullstack tests, each of tests required to
spawn neutron server, neutron ovs agent, etc.
Now all of those tests are consolidated into one test end execution time
of test cases from that class went down from about 125 seconds to around
45 seconds.
Change-Id: I4c0444700bff734cf1947f0e0a3e44ea0e11a155
(cherry picked from commit 8935b7a133
)
This commit is contained in:
parent
e5c743b820
commit
f8628b5c04
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue