mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix linux state tests- add new comment
This commit is contained in:
parent
294156743a
commit
c70772c5a0
2 changed files with 5 additions and 5 deletions
|
@ -1911,12 +1911,12 @@ class StateModuleTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
'''
|
||||
self._add_runtime_pillar(pillar={'test': True})
|
||||
testfile = os.path.join(TMP, 'testfile')
|
||||
comment = 'The file {0} is set to be changed'.format(testfile)
|
||||
comment = 'The file {0} is set to be changed\nNote: No changes made, actual changes may\nbe different due to other states.'.format(testfile)
|
||||
ret = self.run_function('state.sls', ['core'])
|
||||
|
||||
for key, val in ret.items():
|
||||
self.assertEqual(val['comment'], comment)
|
||||
self.assertEqual(val['changes'], {})
|
||||
self.assertEqual(val['changes'], {'newfile': testfile})
|
||||
|
||||
def test_state_sls_id_test_state_test_post_run(self):
|
||||
'''
|
||||
|
@ -1948,8 +1948,8 @@ class StateModuleTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
for key, val in ret.items():
|
||||
self.assertEqual(
|
||||
val['comment'],
|
||||
'The file {0} is set to be changed'.format(file_name))
|
||||
self.assertEqual(val['changes'], {})
|
||||
'The file {0} is set to be changed\nNote: No changes made, actual changes may\nbe different due to other states.'.format(file_name))
|
||||
self.assertEqual(val['changes'], {'newfile': file_name})
|
||||
|
||||
def test_state_sls_id_test_true_post_run(self):
|
||||
'''
|
||||
|
|
|
@ -62,7 +62,7 @@ class SSHStateTest(SSHCase):
|
|||
ret = self.run_function('state.sls_id', ['ssh-file-test', SSH_SLS,
|
||||
'test=True'])
|
||||
self._check_dict_ret(ret=ret, val='comment',
|
||||
exp_ret='The file /tmp/test is set to be changed')
|
||||
exp_ret='The file /tmp/test is set to be changed\nNote: No changes made, actual changes may\nbe different due to other states.')
|
||||
|
||||
# check state.sls_id without test=True
|
||||
ret = self.run_function('state.sls_id', ['ssh-file-test', SSH_SLS])
|
||||
|
|
Loading…
Add table
Reference in a new issue