Merge branch '2019.2.1' into aix_docs

This commit is contained in:
Akmod 2019-06-06 12:21:41 -06:00 committed by GitHub
commit 28fbd11bbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View file

@ -649,7 +649,7 @@ def _get_properties(path="", method="GET", forced_params=None):
for elem in path_levels[:-1]:
search_path += '/' + elem
# Lookup for a dictionary with path = "requested path" in list" and return its children
sub = (item for item in sub if item["path"] == search_path).next()['children']
sub = next((item for item in sub if item["path"] == search_path))['children']
# Get leaf element in path
search_path += '/' + path_levels[-1]
sub = next((item for item in sub if item["path"] == search_path))

View file

@ -477,7 +477,8 @@ class PkgTest(ModuleCase, SaltReturnAssertsMixin):
self.assertSaltTrueReturn(ret)
@skipIf(salt.utils.platform.is_windows(), 'minion is windows')
def test_pkg_009_latest_with_epoch(self):
@requires_system_grains
def test_pkg_009_latest_with_epoch(self, grains=None):
'''
This tests for the following issue:
https://github.com/saltstack/salt/issues/31014
@ -488,13 +489,18 @@ class PkgTest(ModuleCase, SaltReturnAssertsMixin):
if not pkgmgr_avail(self.run_function, self.run_function('grains.items')):
self.skipTest('Package manager is not available')
test_name = 'bash-completion'
if grains.get('os') == 'Amazon' and grains.get('osmajorrelease') != 2:
test_name = 'bash-doc'
ret = self.run_state('pkg.installed',
name='bash-completion',
name=test_name,
refresh=False)
self.assertSaltTrueReturn(ret)
@requires_salt_modules('pkg.info_installed')
def test_pkg_010_latest_with_epoch_and_info_installed(self):
@requires_system_grains
def test_pkg_010_latest_with_epoch_and_info_installed(self, grains=None):
'''
Need to check to ensure the package has been
installed after the pkg_latest_epoch sls
@ -507,6 +513,9 @@ class PkgTest(ModuleCase, SaltReturnAssertsMixin):
self.skipTest('Package manager is not available')
package = 'bash-completion'
if grains.get('os') == 'Amazon' and grains.get('osmajorrelease') != 2:
package = 'bash-doc'
pkgquery = 'version'
ret = self.run_function('pkg.info_installed', [package])