pvl.hosts.test: host with fqdn name still gets a dhcp option host-name
authorTero Marttila <terom@paivola.fi>
Mon, 02 Mar 2015 00:38:50 +0200
changeset 677 8e3dfa27d8d1
parent 676 775747ebdc45
child 678 5f280b922905
pvl.hosts.test: host with fqdn name still gets a dhcp option host-name
pvl/hosts/tests.py
--- a/pvl/hosts/tests.py	Mon Mar 02 00:25:21 2015 +0200
+++ b/pvl/hosts/tests.py	Mon Mar 02 00:38:50 2015 +0200
@@ -587,6 +587,20 @@
             ], [])
         ])
 
+    def testHostFQDN(self):
+        host = Host.build('foo.test', 'test',
+                ip          = '192.0.2.1',
+                ethernet    = '00:11:22:33:44:55',
+        )
+
+        self.assertBlocksEqual(list(dhcp.dhcp_host(host)), [
+            (('host', 'foo.test'), [
+                    ('option', 'host-name', "foo.test"),
+                    ('fixed-address', '192.0.2.1'),
+                    ('hardware', 'ethernet', '00:11:22:33:44:55'),
+            ], [])
+        ])
+
     def testHostStatic(self):
         host = Host.build('foo', 'test',
                 ip          = '192.0.2.1',