mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #28167 from The-Loeki/patch-1
file.serialize needs to add a final newline to serialized files
This commit is contained in:
commit
8e08f39381
2 changed files with 3 additions and 1 deletions
|
@ -4310,6 +4310,8 @@ def serialize(name,
|
|||
'result': False
|
||||
}
|
||||
|
||||
contents += '\n'
|
||||
|
||||
if __opts__['test']:
|
||||
ret['changes'] = __salt__['file.check_managed_changes'](
|
||||
name=name,
|
||||
|
|
|
@ -63,7 +63,7 @@ class TestFileState(TestCase):
|
|||
self.assertEqual(json.loads(returner.returned), dataset)
|
||||
|
||||
filestate.serialize('/tmp', dataset, formatter="python")
|
||||
self.assertEqual(returner.returned, pprint.pformat(dataset))
|
||||
self.assertEqual(returner.returned, pprint.pformat(dataset) + '\n')
|
||||
|
||||
def test_contents_and_contents_pillar(self):
|
||||
def returner(contents, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Reference in a new issue