Merge branch '2019.2.0.rc1' into update_req_osx

This commit is contained in:
Pedro Algarvio 2019-01-23 07:28:41 +00:00 committed by GitHub
commit d4d401b5d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 58 additions and 38 deletions

11
Pipfile
View file

@ -20,17 +20,18 @@ boto = ">=2.32.1"
boto3 = ">=1.2.1"
moto = ">=0.3.6"
SaltPyLint = ">=v2017.3.6"
pytest = ">=3.5.0"
pytest = ">=4.0.1"
pytest-cov = "*"
pytest-salt = "==2018.12.8"
pytest-timeout = ">=1.3.3"
pytest-tempdir = ">=2018.8.11"
pytest-helpers-namespace = ">=2017.11.11"
[packages.futures]
# Required by Tornado to handle threads stuff.
version = ">=2.0"
markers = "python_version < '3.0'"
[dev-packages.pytest-salt]
git = "git://github.com/saltstack/pytest-salt.git"
ref = "master"
[dev-packages.httpretty]
# httpretty Needs to be here for now even though it's a dependency of boto.
# A pip install on a fresh system will decide to target httpretty 0.8.10 to

View file

@ -1,40 +1,40 @@
backports-abc==0.5
backports.ssl-match-hostname==3.5.0.1
backports.ssl-match-hostname==3.7.0.1
certifi
cffi==1.10.0
CherryPy==10.2.1
cryptography==2.1.4
cffi==1.11.5
CherryPy==17.4.1
cryptography==2.4.2
enum34==1.1.6
futures==3.1.1
futures==3.2.0; python_version == '2.7'
gitdb==0.6.4
GitPython==2.1.3
idna==2.5
GitPython==2.1.10
idna==2.8
ioloop==0.1a0
ipaddress==1.0.18
Jinja2==2.9.6
ipaddress==1.0.22
Jinja2==2.10
libnacl==1.6.1 # required by the nacl module
lxml==3.7.3
Mako==1.0.6
MarkupSafe==1.0
msgpack-python==0.4.8
psutil==5.2.2
pyasn1==0.2.3
pycparser==2.17
lxml==4.3.0
Mako==1.0.7
MarkupSafe==1.1.0
msgpack-python==0.5.6
psutil==5.4.8
pyasn1==0.4.5
pycparser==2.19
pycrypto==2.6.1
pycurl==7.43.0
PyMySQL==0.7.11
pyOpenSSL==17.5.0
pycurl==7.43.0.2
PyMySQL==0.9.3
pyOpenSSL==18.0.0
#python-certifi-win32==1.2
python-dateutil==2.6.1
python-gnupg==0.4.1
python-dateutil==2.7.5
python-gnupg==0.4.3
pythonnet==2.3.0
pywin32==223
PyYAML==3.12
pyzmq==16.0.3
pywin32==224
PyYAML==3.13
pyzmq==17.1.2
requests==2.21.0
singledispatch==3.4.0.3
smmap==0.9.0
timelib==0.2.4
tornado==4.5.1
wheel==0.30.0a0
tornado==4.5.3
wheel==0.32.3
WMI==1.4.9

View file

@ -2,8 +2,6 @@
mock>=2.0.0
SaltPyLint>=v2017.3.6
pytest>=3.5.0
git+https://github.com/saltstack/pytest-salt.git@master#egg=pytest-salt
testinfra>=1.7.0,!=1.17.0
# httpretty Needs to be here for now even though it's a dependency of boto.

View file

@ -1,4 +1,7 @@
pytest>=3.5.0
pytest-helpers-namespace
pytest-tempdir
# PyTest
pytest >= 4.0.1
pytest-cov
pytest-salt == 2018.12.8
pytest-timeout >= 1.3.3
pytest-tempdir >= 2018.8.11
pytest-helpers-namespace >= 2017.11.11

View file

@ -97,6 +97,7 @@ import decimal
# Import Salt Libs
import salt.utils.cloud
import salt.utils.compat
import salt.utils.files
import salt.utils.hashutils
import salt.utils.json
@ -1225,7 +1226,7 @@ def get_imageid(vm_):
_t = lambda x: datetime.datetime.strptime(x['creationDate'], '%Y-%m-%dT%H:%M:%S.%fZ')
image_id = sorted(aws.query(params, location=get_location(),
provider=get_provider(), opts=__opts__, sigver='4'),
lambda i, j: cmp(_t(i), _t(j))
lambda i, j: salt.utils.compat.cmp(_t(i), _t(j))
)[-1]['imageId']
get_imageid.images[image] = image_id
return image_id

View file

@ -406,6 +406,7 @@ class Pillar(object):
if not isinstance(self.extra_minion_data, dict):
self.extra_minion_data = {}
log.error('Extra minion data must be a dictionary')
self._closing = False
def __valid_on_demand_ext_pillar(self, opts):
'''
@ -1109,6 +1110,17 @@ class Pillar(object):
log.error(msg, exc_info=True)
return errors
def destroy(self):
'''
This method exist in order to be API compatible with RemotePillar
'''
if self._closing:
return
self._closing = True
def __del__(self):
self.destroy()
# TODO: actually migrate from Pillar to AsyncPillar to allow for futures in
# ext_pillar etc.

View file

@ -22,6 +22,9 @@ from tests.support.helpers import (
from tests.support.unit import skipIf
import tests.support.paths as paths
# Import 3rd party libs
import salt.ext.six as six
# Import salt libs
import salt.utils.files
import salt.utils.path
@ -78,6 +81,7 @@ class CPModuleTest(ModuleCase):
self.assertNotIn('bacon', data)
@with_tempfile()
@skipIf(salt.utils.platform.is_windows() and six.PY3, 'This test hangs on Windows on Py3')
def test_get_file_templated_paths(self, tgt):
'''
cp.get_file

View file

@ -240,6 +240,7 @@ class UserTestCase(TestCase, LoaderModuleMockMixin):
'shadow.default_hash': shadow_hash,
'file.group_to_gid': MagicMock(side_effect=['foo']),
'file.gid_to_group': MagicMock(side_effect=[5000])}
def mock_exists(*args):
return True

View file

@ -8,7 +8,7 @@ import shutil
# salt testing libs
from tests.support.unit import TestCase, skipIf
from tests.support.mock import(
from tests.support.mock import (
patch,
mock_open,
NO_MOCK,