Merge branch '2017.7.8' into '2017.7'

No conflicts.
This commit is contained in:
rallytime 2018-08-08 17:18:22 -04:00
commit c6f8429e41
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19
2 changed files with 25 additions and 3 deletions

View file

@ -163,16 +163,23 @@ class GrainsAppendTestCase(ModuleCase):
def test_grains_append_val_already_present(self):
'''
Tests the return of a grains.append call when the value is already present in the grains list.
Tests the return of a grains.append call when the value is already
present in the grains list.
'''
messaging = 'The val {0} was already in the list salttesting-grain-key'.format(self.GRAIN_VAL)
msg = 'The val {0} was already in the list ' \
'salttesting-grain-key'.format(self.GRAIN_VAL)
# First, make sure the test grain is present
self.run_function('grains.append', [self.GRAIN_KEY, self.GRAIN_VAL])
# Now try to append again
ret = self.run_function('grains.append', [self.GRAIN_KEY, self.GRAIN_VAL])
self.assertEqual(messaging, ret)
if not ret or isinstance(ret, dict):
# Sleep for a bit, sometimes the second "append" runs too quickly
time.sleep(5)
ret = self.run_function('grains.append', [self.GRAIN_KEY, self.GRAIN_VAL])
assert msg == ret
def test_grains_append_val_is_list(self):
'''

View file

@ -9,6 +9,16 @@ from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
# Import Salt libs
import salt.utils
# Import 3rd-Party libs
HAS_LSB_RELEASE = True
try:
import lsb_release
except ImportError:
HAS_LSB_RELEASE = False
class CompileTest(ModuleCase):
'''
@ -27,6 +37,11 @@ class CompileTest(ModuleCase):
Test when we have an error in a execution module
called by jinja
'''
if salt.utils.is_linux() and HAS_LSB_RELEASE:
release = lsb_release.get_distro_information()
if release.get('ID') == 'Debian' and int(release.get('RELEASE', 0)) < 9:
self.skipTest('This test is flaky on Debian 8. Skipping.')
ret = self.run_function('state.sls', ['issue-10010'])
self.assertTrue(
', in jinja_error' in ret[0].strip())