diff options
| author | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-09-05 13:11:09 +0200 |
|---|---|---|
| committer | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-09-05 13:11:09 +0200 |
| commit | 744c779182cba32314f8435660a61c2711cb9f54 (patch) | |
| tree | 7871342bf0b122217b51493286bac982313b48da /tests/unittests/test_handler/test_handler_set_hostname.py | |
| parent | 8a2a88e0bb4520eabe99b6686413a548f3d59652 (diff) | |
| parent | 1d27cd75eaaeef7b72f3be77de24da815c82a825 (diff) | |
| download | vyos-cloud-init-744c779182cba32314f8435660a61c2711cb9f54.tar.gz vyos-cloud-init-744c779182cba32314f8435660a61c2711cb9f54.zip | |
Merged trunk lp:cloud-init
Diffstat (limited to 'tests/unittests/test_handler/test_handler_set_hostname.py')
| -rw-r--r-- | tests/unittests/test_handler/test_handler_set_hostname.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/unittests/test_handler/test_handler_set_hostname.py b/tests/unittests/test_handler/test_handler_set_hostname.py index a1aba62f..6344ec0c 100644 --- a/tests/unittests/test_handler/test_handler_set_hostname.py +++ b/tests/unittests/test_handler/test_handler_set_hostname.py @@ -35,7 +35,6 @@ class TestHostname(t_help.FilesystemMockingTestCase): ds = None cc = cloud.Cloud(ds, paths, {}, distro, None) self.patchUtils(self.tmp) - self.patchOS(self.tmp) cc_set_hostname.handle('cc_set_hostname', cfg, cc, LOG, []) contents = util.load_file("/etc/sysconfig/network") @@ -56,3 +55,16 @@ class TestHostname(t_help.FilesystemMockingTestCase): cfg, cc, LOG, []) contents = util.load_file("/etc/hostname") self.assertEquals('blah', contents.strip()) + + def test_write_hostname_sles(self): + cfg = { + 'hostname': 'blah.blah.blah.suse.com', + } + distro = self._fetch_distro('sles') + paths = helpers.Paths({}) + ds = None + cc = cloud.Cloud(ds, paths, {}, distro, None) + self.patchUtils(self.tmp) + cc_set_hostname.handle('cc_set_hostname', cfg, cc, LOG, []) + contents = util.load_file("/etc/HOSTNAME") + self.assertEquals('blah', contents.strip()) |
