Increase ec2 cloud timeouts to 1000

This commit is contained in:
Daniel A. Wozniak 2018-05-22 12:23:31 -07:00
parent 57dd89e6c3
commit 7e948eb540
No known key found for this signature in database
GPG Key ID: 166B9D2C06C82D61

View File

@ -45,7 +45,6 @@ class EC2Test(ShellCase):
'''
Integration tests for the EC2 cloud provider in Salt-Cloud
'''
TIMEOUT = 500
def _installer_name(self):
'''
@ -151,7 +150,7 @@ class EC2Test(ShellCase):
dfp.write(sfp.read())
return dst
def _test_instance(self, profile='ec2-test', debug=False, timeout=TIMEOUT):
def _test_instance(self, profile='ec2-test', debug=False, timeout=1000):
'''
Tests creating and deleting an instance on EC2 (classic)
'''
@ -187,14 +186,14 @@ class EC2Test(ShellCase):
'''
# create the instance
rename = INSTANCE_NAME + '-rename'
instance = self.run_cloud('-p ec2-test {0} --no-deploy'.format(INSTANCE_NAME), timeout=500)
instance = self.run_cloud('-p ec2-test {0} --no-deploy'.format(INSTANCE_NAME), timeout=1000)
ret_str = '{0}:'.format(INSTANCE_NAME)
# check if instance returned
try:
self.assertIn(ret_str, instance)
except AssertionError:
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=500)
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=1000)
raise
change_name = self.run_cloud('-a rename {0} newname={1} --assume-yes'.format(INSTANCE_NAME, rename), timeout=500)
@ -206,11 +205,11 @@ class EC2Test(ShellCase):
for result in exp_results:
self.assertIn(result, check_rename[0])
except AssertionError:
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=500)
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=1000)
raise
# delete the instance
delete = self.run_cloud('-d {0} --assume-yes'.format(rename), timeout=500)
delete = self.run_cloud('-d {0} --assume-yes'.format(rename), timeout=1000)
ret_str = ' shutting-down'
# check if deletion was performed appropriately
@ -238,7 +237,7 @@ class EC2Test(ShellCase):
'win_installer': self.copy_file(self.INSTALLER),
},
)
self._test_instance('ec2-win2012r2-test', debug=True, timeout=500)
self._test_instance('ec2-win2012r2-test', debug=True, timeout=1000)
@skipIf(not HAS_WINRM, 'Skip when winrm dependencies are missing')
def test_win2012r2_winrm(self):
@ -256,7 +255,7 @@ class EC2Test(ShellCase):
}
)
self._test_instance('ec2-win2012r2-test', debug=True, timeout=800)
self._test_instance('ec2-win2012r2-test', debug=True, timeout=1000)
@expectedFailure
def test_win2016_winexe(self):
@ -274,7 +273,7 @@ class EC2Test(ShellCase):
'win_installer': self.copy_file(self.INSTALLER),
},
)
self._test_instance('ec2-win2016-test', debug=True, timeout=500)
self._test_instance('ec2-win2016-test', debug=True, timeout=1000)
@skipIf(not HAS_WINRM, 'Skip when winrm dependencies are missing')
def test_win2016_winrm(self):
@ -292,7 +291,7 @@ class EC2Test(ShellCase):
}
)
self._test_instance('ec2-win2016-test', debug=True, timeout=800)
self._test_instance('ec2-win2016-test', debug=True, timeout=1000)
def tearDown(self):
'''
@ -303,4 +302,4 @@ class EC2Test(ShellCase):
# if test instance is still present, delete it
if ret_str in query:
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=self.TIMEOUT)
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=1000)