mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2017.7' into issue49154
This commit is contained in:
commit
c2aba7abde
3 changed files with 10 additions and 7 deletions
|
@ -2933,7 +2933,7 @@ def directory(name,
|
|||
perms: full_control
|
||||
- win_inheritance: False
|
||||
'''
|
||||
name = os.path.expanduser(name)
|
||||
name = os.path.normcase(os.path.expanduser(name))
|
||||
ret = {'name': name,
|
||||
'changes': {},
|
||||
'pchanges': {},
|
||||
|
@ -3419,7 +3419,7 @@ def recurse(name,
|
|||
)
|
||||
kwargs.pop('env')
|
||||
|
||||
name = os.path.expanduser(sdecode(name))
|
||||
name = os.path.normcase(os.path.expanduser(sdecode(name)))
|
||||
|
||||
user = _test_owner(kwargs, user=user)
|
||||
if salt.utils.is_windows():
|
||||
|
|
|
@ -1115,7 +1115,10 @@ class TestDaemon(object):
|
|||
for dirname in (TMP, RUNTIME_VARS.TMP_STATE_TREE,
|
||||
RUNTIME_VARS.TMP_PILLAR_TREE, RUNTIME_VARS.TMP_PRODENV_STATE_TREE):
|
||||
if os.path.isdir(dirname):
|
||||
shutil.rmtree(dirname, onerror=remove_readonly)
|
||||
try:
|
||||
shutil.rmtree(dirname, onerror=remove_readonly)
|
||||
except Exception:
|
||||
log.exception('Failed to remove directory: %s', dirname)
|
||||
|
||||
def wait_for_jid(self, targets, jid, timeout=120):
|
||||
time.sleep(1) # Allow some time for minions to accept jobs
|
||||
|
|
|
@ -267,7 +267,7 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
|
||||
if IS_WINDOWS:
|
||||
expected = 'The \'mode\' option is not supported on Windows'
|
||||
self.assertEqual(ret[ret.keys()[0]]['comment'], expected)
|
||||
self.assertEqual(ret[list(ret)[0]]['comment'], expected)
|
||||
self.assertSaltFalseReturn(ret)
|
||||
return
|
||||
|
||||
|
@ -303,7 +303,7 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
|
||||
if IS_WINDOWS:
|
||||
expected = 'The \'mode\' option is not supported on Windows'
|
||||
self.assertEqual(ret[ret.keys()[0]]['comment'], expected)
|
||||
self.assertEqual(ret[list(ret)[0]]['comment'], expected)
|
||||
self.assertSaltFalseReturn(ret)
|
||||
return
|
||||
|
||||
|
@ -335,7 +335,7 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
|
||||
if IS_WINDOWS:
|
||||
expected = 'The \'mode\' option is not supported on Windows'
|
||||
self.assertEqual(ret[ret.keys()[0]]['comment'], expected)
|
||||
self.assertEqual(ret[list(ret)[0]]['comment'], expected)
|
||||
self.assertSaltFalseReturn(ret)
|
||||
return
|
||||
|
||||
|
@ -418,7 +418,7 @@ class FileTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
)
|
||||
if IS_WINDOWS:
|
||||
expected = 'The \'mode\' option is not supported on Windows'
|
||||
self.assertEqual(ret[ret.keys()[0]]['comment'], expected)
|
||||
self.assertEqual(ret[list(ret)[0]]['comment'], expected)
|
||||
self.assertSaltFalseReturn(ret)
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue