diff options
| author | Kim Hagen <kim.sidney@gmail.com> | 2019-01-23 13:20:25 +0100 |
|---|---|---|
| committer | Kim Hagen <kim.sidney@gmail.com> | 2019-01-23 13:20:25 +0100 |
| commit | c4da1a5cddacaa7c2a15df9170f21c3fce78fb15 (patch) | |
| tree | b6abeebd0789141fea8696e2df9aa3db5663ebf0 /tests/unittests/test_handler/test_handler_write_files.py | |
| parent | b120f4f7a670674779a93f8c882c81f44a993888 (diff) | |
| parent | 45d731a61a07447521d56e8ce4f19ebfeba2aa78 (diff) | |
| download | vyos-cloud-init-c4da1a5cddacaa7c2a15df9170f21c3fce78fb15.tar.gz vyos-cloud-init-c4da1a5cddacaa7c2a15df9170f21c3fce78fb15.zip | |
Merge tag '18.5' into current
release 18.5
Bump the version on cloudinit/version.py to be 18.5 and update ChangeLog
LP: #1808380
Conflicts:
config/cloud.cfg.tmpl
Diffstat (limited to 'tests/unittests/test_handler/test_handler_write_files.py')
| -rw-r--r-- | tests/unittests/test_handler/test_handler_write_files.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unittests/test_handler/test_handler_write_files.py b/tests/unittests/test_handler/test_handler_write_files.py index 7fa8fd21..bc8756ca 100644 --- a/tests/unittests/test_handler/test_handler_write_files.py +++ b/tests/unittests/test_handler/test_handler_write_files.py @@ -52,6 +52,18 @@ class TestWriteFiles(FilesystemMockingTestCase): "test_simple", [{"content": expected, "path": filename}]) self.assertEqual(util.load_file(filename), expected) + def test_append(self): + self.patchUtils(self.tmp) + existing = "hello " + added = "world\n" + expected = existing + added + filename = "/tmp/append.file" + util.write_file(filename, existing) + write_files( + "test_append", + [{"content": added, "path": filename, "append": "true"}]) + self.assertEqual(util.load_file(filename), expected) + def test_yaml_binary(self): self.patchUtils(self.tmp) data = util.load_yaml(YAML_TEXT) |
