Update the curl command in the __public_instance_is_accessible function
of test_netadmin to return an error code which we can then check for and handle properly. This should allow calling functions to properly retry and timout if an actual test failure happens.
This commit is contained in:
parent
c911c6d737
commit
458932a4f0
@ -109,9 +109,12 @@ class SecurityGroupTests(base.UserSmokeTestCase):
|
||||
|
||||
def __public_instance_is_accessible(self):
|
||||
id_url = "latest/meta-data/instance-id"
|
||||
options = "-s --max-time 1"
|
||||
options = "-f -s --max-time 1"
|
||||
command = "curl %s %s/%s" % (options, self.data['public_ip'], id_url)
|
||||
instance_id = commands.getoutput(command).strip()
|
||||
status, output = commands.getstatusoutput(command)
|
||||
instance_id = output.strip()
|
||||
if status > 0:
|
||||
return False
|
||||
if not instance_id:
|
||||
return False
|
||||
if instance_id != self.data['instance'].id:
|
||||
|
Loading…
Reference in New Issue
Block a user