mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2019.2.1' of https://github.com/saltstack/salt into gce_cloud_test
This commit is contained in:
commit
59e20bc792
2 changed files with 16 additions and 3 deletions
|
@ -5,11 +5,20 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
|
||||
# Import Salt Testing Libs
|
||||
from tests.support.case import SSHCase
|
||||
from tests.support.jinja_filters import JinjaFiltersTest
|
||||
|
||||
|
||||
class SSHJinjaFiltersTest(SSHCase, JinjaFiltersTest):
|
||||
class SSHJinjaFiltersTest(SSHCase):
|
||||
'''
|
||||
testing Jinja filters are available via state system & salt-ssh
|
||||
'''
|
||||
pass
|
||||
|
||||
def test_dateutils_strftime(self):
|
||||
'''
|
||||
test jinja filter datautils.strftime
|
||||
'''
|
||||
arg = self._arg_str('state.sls', ['jinja_filters.dateutils_strftime'])
|
||||
ret = self.run_ssh(arg)
|
||||
import salt.utils.json
|
||||
ret = salt.utils.json.loads(ret)['localhost']
|
||||
self.assertIn('module_|-test_|-test.echo_|-run', ret)
|
||||
self.assertIn('ret', ret['module_|-test_|-test.echo_|-run']['changes'])
|
||||
|
|
|
@ -828,6 +828,10 @@ class TestDaemon(TestProgram):
|
|||
except psutils.AccessDenied:
|
||||
# We might get access denied if not running as root
|
||||
if not salt.utils.platform.is_windows():
|
||||
pinfo = proc.as_dict(attrs=['pid', 'name', 'username'])
|
||||
log.error('Unable to access process %s, '
|
||||
'running command %s as user %s',
|
||||
pinfo['pid'], pinfo['name'], pinfo['username'])
|
||||
raise
|
||||
if any((cmdline == proc_cmdline[n:n + cmd_len])
|
||||
for n in range(len(proc_cmdline) - cmd_len + 1)):
|
||||
|
|
Loading…
Add table
Reference in a new issue