Fix linux state tests- add new comment

This commit is contained in:
Ch3LL 2019-04-12 19:50:52 -04:00
parent 294156743a
commit c70772c5a0
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73
2 changed files with 5 additions and 5 deletions

View file

@ -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):
'''

View file

@ -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])