Fix check for FloatingIP status before check connection
This patch changes the order in which the floatingIP status is being checked in all the network_basic and network_advanced tests. The check for floatingip status should be done before your check for public network connectivity to the VM. This would give the real details for the test case if it was related to floatingip setup or something in the test environment. Change-Id: Ie606ba5194fe87047d553056ba0a82bcf8830ac0 Partial-Bug: #1426764
This commit is contained in:
parent
5406039373
commit
dc8bcdba8f
|
@ -84,10 +84,11 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
|
|||
should_connect=should_connect,
|
||||
servers_for_debug=[self.server])
|
||||
floating_ip = self.floating_ip.floating_ip_address
|
||||
# Check FloatingIP status before checking the connectivity
|
||||
self.check_floating_ip_status(self.floating_ip, 'ACTIVE')
|
||||
self.check_public_network_connectivity(floating_ip, username,
|
||||
private_key, should_connect,
|
||||
servers=[self.server])
|
||||
self.check_floating_ip_status(self.floating_ip, 'ACTIVE')
|
||||
|
||||
def _wait_server_status_and_check_network_connectivity(self):
|
||||
self.servers_client.wait_for_server_status(self.server['id'], 'ACTIVE')
|
||||
|
|
|
@ -190,12 +190,13 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
|
|||
if should_connect:
|
||||
private_key = self._get_server_key(server)
|
||||
floatingip_status = 'ACTIVE'
|
||||
# Check FloatingIP Status before initiating a connection
|
||||
if should_check_floating_ip_status:
|
||||
self.check_floating_ip_status(floating_ip, floatingip_status)
|
||||
# call the common method in the parent class
|
||||
super(TestNetworkBasicOps, self).check_public_network_connectivity(
|
||||
ip_address, ssh_login, private_key, should_connect, msg,
|
||||
self.servers)
|
||||
if should_check_floating_ip_status:
|
||||
self.check_floating_ip_status(floating_ip, floatingip_status)
|
||||
|
||||
def _disassociate_floating_ips(self):
|
||||
floating_ip, server = self.floating_ip_tuple
|
||||
|
|
Loading…
Reference in New Issue