mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
commit
00f8ef0c55
2 changed files with 5 additions and 2 deletions
|
@ -296,7 +296,8 @@ def create(vm_):
|
|||
'''
|
||||
data = show_instance(vm_['name'], call='action')
|
||||
pprint.pprint(data)
|
||||
if str(data.get('main_ip', '0')) == '0':
|
||||
main_ip = str(data.get('main_ip', '0'))
|
||||
if main_ip.startswith('0'):
|
||||
time.sleep(3)
|
||||
return False
|
||||
return data['main_ip']
|
||||
|
|
|
@ -158,10 +158,12 @@ class VultrTest(integration.ShellCase):
|
|||
'''
|
||||
# check if instance with salt installed returned
|
||||
try:
|
||||
create_vm = self.run_cloud('-p vultr-test {0}'.format(INSTANCE_NAME), timeout=500)
|
||||
self.assertIn(
|
||||
INSTANCE_NAME,
|
||||
[i.strip() for i in self.run_cloud('-p vultr-test {0}'.format(INSTANCE_NAME), timeout=500)]
|
||||
[i.strip() for i in create_vm]
|
||||
)
|
||||
self.assertNotIn('Failed to start', str(create_vm))
|
||||
except AssertionError:
|
||||
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=500)
|
||||
raise
|
||||
|
|
Loading…
Add table
Reference in a new issue