Merge pull request #50276 from rallytime/merge-2018.3

[2018.3] Merge forward from 2017.7 to 2018.3
This commit is contained in:
Nicole Thomas 2018-10-29 15:05:14 -04:00 committed by GitHub
commit 10ba8b42a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 4 deletions

View file

@ -1,6 +1,6 @@
---
<% vagrant = system('gem list -i kitchen-vagrant 2>/dev/null >/dev/null') %>
<% version = '2017.7.6' %>
<% version = '2017.7.8' %>
<% platformsfile = ENV['SALT_KITCHEN_PLATFORMS'] || '.kitchen/platforms.yml' %>
<% driverfile = ENV['SALT_KITCHEN_DRIVER'] || '.kitchen/driver.yml' %>
<% verifierfile = ENV['SALT_KITCHEN_VERIFIER'] || '.kitchen/verifier.yml' %>

View file

@ -1313,6 +1313,13 @@ class LocalClient(object):
if raw['data']['return'] == {}:
continue
# if the minion throws an exception containing the word "return"
# the master will try to handle the string as a dict in the next
# step. Check if we have a string, log the issue and continue.
if isinstance(raw['data']['return'], six.string_types):
log.error("unexpected return from minion: %s", raw)
continue
if 'return' in raw['data']['return'] and \
raw['data']['return']['return'] == {}:
continue

View file

@ -21,6 +21,7 @@ from tests.support.helpers import expensiveTest, generate_random_name
from tests.support.unit import expectedFailure, skipIf
from tests.support import win_installer
# Create the cloud instance name to be used throughout the tests
INSTANCE_NAME = generate_random_name('CLOUD-TEST-')
PROVIDER_NAME = 'ec2'
@ -33,6 +34,7 @@ class EC2Test(ShellCase):
Integration tests for the EC2 cloud provider in Salt-Cloud
'''
def _installer_name(self):
'''
Determine the downloaded installer name by searching the files
@ -96,11 +98,12 @@ class EC2Test(ShellCase):
id_ = config[profile_str][PROVIDER_NAME]['id']
key = config[profile_str][PROVIDER_NAME]['key']
key_name = config[profile_str][PROVIDER_NAME]['keyname']
sec_group = config[profile_str][PROVIDER_NAME]['securitygroup']
sec_group = config[profile_str][PROVIDER_NAME]['securitygroupname'][0]
subnet_id = config[profile_str][PROVIDER_NAME]['subnet_id']
private_key = config[profile_str][PROVIDER_NAME]['private_key']
location = config[profile_str][PROVIDER_NAME]['location']
conf_items = [id_, key, key_name, sec_group, private_key, location]
conf_items = [id_, key, key_name, sec_group, subnet_id, private_key, location]
missing_conf_item = []
for item in conf_items:
@ -109,7 +112,7 @@ class EC2Test(ShellCase):
if missing_conf_item:
self.skipTest(
'An id, key, keyname, security group, private key, and location must '
'An id, key, keyname, security group, subnet id, private key, and location must '
'be provided to run these tests. One or more of these elements is '
'missing. Check tests/integration/files/conf/cloud.providers.d/{0}.conf'
.format(PROVIDER_NAME)