--- a/pvl/hosts/tests.py Wed Feb 25 14:54:24 2015 +0200
+++ b/pvl/hosts/tests.py Wed Feb 25 14:56:59 2015 +0200
@@ -141,6 +141,22 @@
('1.0.2.0.0.0.0.c.0.0.0.0.0.0.0.0', 'PTR'): ['host.domain.'],
})
+ def testHostAlias(self):
+ h = host.Host.build('host', 'domain',
+ ip = '192.0.2.1',
+ alias = 'test *.test',
+ )
+
+ self.assertEquals(h.alias, ['test', '*.test'])
+
+ self.assertZoneEquals(zone.host_forward(h, 'domain'), {
+ ('host', 'A'): ['192.0.2.1'],
+ ('test', 'CNAME'): ['host'],
+ ('*.test', 'CNAME'): ['host'],
+ })
+
+ # TODO: forward=... with alias=
+
def testHostDelegateForward(self):
h = host.Host.build('host', 'example.com',
forward = 'host.example.net',