summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-06-15 10:03:45 -0400
committerScott Moser <smoser@brickies.net>2017-06-15 17:10:54 -0400
commitecb408afa1104fe49ce6eb1dc5708be56abd5cb2 (patch)
tree8d1161c2f44f07aec73348fa6d2c8a14701d7dd6 /tests/unittests/test_handler
parent9ccb8f5e2ab262ee04bb9c103c1302479f7c81d3 (diff)
downloadvyos-cloud-init-ecb408afa1104fe49ce6eb1dc5708be56abd5cb2.tar.gz
vyos-cloud-init-ecb408afa1104fe49ce6eb1dc5708be56abd5cb2.zip
FreeBSD: Make freebsd a variant, fix unittests and tools/build-on-freebsd.
- Simplify the logic of 'variant' in util.system_info much of the data from https://github.com/hpcugent/easybuild/wiki/OS_flavor_name_version - fix get_resource_disk_on_freebsd when running on a system without an Azure resource disk. - fix tools/build-on-freebsd to replace oauth with oauthlib and add bash which is a dependency for tests. - update a fiew places that were checking for freebsd but not using the util.is_FreeBSD()
Diffstat (limited to 'tests/unittests/test_handler')
-rw-r--r--tests/unittests/test_handler/test_handler_ntp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unittests/test_handler/test_handler_ntp.py b/tests/unittests/test_handler/test_handler_ntp.py
index c4299d94..7f278646 100644
--- a/tests/unittests/test_handler/test_handler_ntp.py
+++ b/tests/unittests/test_handler/test_handler_ntp.py
@@ -62,7 +62,7 @@ class TestNtp(FilesystemMockingTestCase):
def test_ntp_rename_ntp_conf(self):
"""When NTP_CONF exists, rename_ntp moves it."""
ntpconf = self.tmp_path("ntp.conf", self.new_root)
- os.mknod(ntpconf)
+ util.write_file(ntpconf, "")
with mock.patch("cloudinit.config.cc_ntp.NTP_CONF", ntpconf):
cc_ntp.rename_ntp_conf()
self.assertFalse(os.path.exists(ntpconf))