mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2017.7.8' into '2017.7'
No conflicts.
This commit is contained in:
commit
ed6fb8b739
4 changed files with 14 additions and 6 deletions
|
@ -2439,7 +2439,7 @@ def wait_for_instance(
|
|||
)
|
||||
pprint.pprint(console)
|
||||
time.sleep(5)
|
||||
output = console['output_decoded']
|
||||
output = salt.utils.to_unicode(console['output_decoded'])
|
||||
comps = output.split('-----BEGIN SSH HOST KEY KEYS-----')
|
||||
if len(comps) < 2:
|
||||
# Fail; there are no host keys
|
||||
|
|
|
@ -34,6 +34,7 @@ def __random_name(size=6):
|
|||
# Create the cloud instance name to be used throughout the tests
|
||||
INSTANCE_NAME = __random_name()
|
||||
PROVIDER_NAME = 'vultr'
|
||||
TIMEOUT = 500
|
||||
|
||||
|
||||
class VultrTest(ShellCase):
|
||||
|
@ -157,20 +158,20 @@ class VultrTest(ShellCase):
|
|||
'''
|
||||
# check if instance with salt installed returned
|
||||
try:
|
||||
create_vm = self.run_cloud('-p vultr-test {0}'.format(INSTANCE_NAME), timeout=500)
|
||||
create_vm = self.run_cloud('-p vultr-test {0}'.format(INSTANCE_NAME), timeout=800)
|
||||
self.assertIn(
|
||||
INSTANCE_NAME,
|
||||
[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)
|
||||
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=TIMEOUT)
|
||||
raise
|
||||
|
||||
# Vultr won't let us delete an instance less than 5 minutes old.
|
||||
time.sleep(420)
|
||||
# delete the instance
|
||||
results = self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=500)
|
||||
results = self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=TIMEOUT)
|
||||
try:
|
||||
self.assertIn(
|
||||
'True',
|
||||
|
@ -186,6 +187,6 @@ class VultrTest(ShellCase):
|
|||
# If we exceed 6 minutes and the instance is still there, quit
|
||||
ct = 0
|
||||
while ct < 12 and INSTANCE_NAME in [i.strip() for i in self.run_cloud('--query')]:
|
||||
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=500)
|
||||
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME), timeout=TIMEOUT)
|
||||
time.sleep(30)
|
||||
ct = ct + 1
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
import time
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.support.unit import TestCase
|
||||
from tests.support.paths import TMP_CONF_DIR
|
||||
from tests.support.unit import TestCase, skipIf
|
||||
|
||||
# Import Salt libs
|
||||
import salt.config
|
||||
|
@ -73,6 +74,8 @@ class NetapiClientTest(TestCase):
|
|||
self.assertTrue(set(['master.pem', 'master.pub']).issubset(set(ret['data']['return']['local'])))
|
||||
|
||||
def test_wheel_async(self):
|
||||
# Give this test a little breathing room
|
||||
time.sleep(3)
|
||||
low = {'client': 'wheel_async', 'fun': 'key.list_all'}
|
||||
low.update(self.eauth_creds)
|
||||
|
||||
|
@ -80,6 +83,7 @@ class NetapiClientTest(TestCase):
|
|||
self.assertIn('jid', ret)
|
||||
self.assertIn('tag', ret)
|
||||
|
||||
@skipIf(True, 'This is not testing anything. Skipping for now.')
|
||||
def test_runner(self):
|
||||
# TODO: fix race condition in init of event-- right now the event class
|
||||
# will finish init even if the underlying zmq socket hasn't connected yet
|
||||
|
@ -91,6 +95,7 @@ class NetapiClientTest(TestCase):
|
|||
|
||||
ret = self.netapi.run(low)
|
||||
|
||||
@skipIf(True, 'This is not testing anything. Skipping for now.')
|
||||
def test_runner_async(self):
|
||||
low = {'client': 'runner', 'fun': 'cache.grains'}
|
||||
low.update(self.eauth_creds)
|
||||
|
|
|
@ -14,6 +14,7 @@ import re
|
|||
# Import Salt Testing libs
|
||||
from tests.support.unit import skipIf, TestCase
|
||||
from tests.support.case import ModuleCase
|
||||
from tests.support.helpers import flaky
|
||||
from tests.support.mock import NO_MOCK, NO_MOCK_REASON, patch, MagicMock, Mock
|
||||
from tests.support.paths import TMP_CONF_DIR
|
||||
|
||||
|
@ -936,6 +937,7 @@ class TestCustomExtensions(TestCase):
|
|||
dict(opts=self.local_opts, saltenv='test', salt=self.local_salt))
|
||||
self.assertEqual(rendered, u'16777216')
|
||||
|
||||
@flaky
|
||||
def test_http_query(self):
|
||||
'''Test the `http_query` Jinja filter.'''
|
||||
for backend in ('requests', 'tornado', 'urllib2'):
|
||||
|
|
Loading…
Add table
Reference in a new issue