diff --git a/tests/test_octodns_source_tinydns.py b/tests/test_octodns_source_tinydns.py index f4d7a05..47781f2 100644 --- a/tests/test_octodns_source_tinydns.py +++ b/tests/test_octodns_source_tinydns.py @@ -17,7 +17,7 @@ class TestTinyDnsFileSource(TestCase): def test_populate_normal(self): got = Zone('example.com.', []) self.source.populate(got) - self.assertEqual(24, len(got.records)) + self.assertEqual(25, len(got.records)) expected = Zone('example.com.', []) for name, data in ( @@ -48,6 +48,10 @@ class TestTinyDnsFileSource(TestCase): 'cname', {'type': 'CNAME', 'ttl': 3600, 'value': 'www.example.com.'}, ), + ( + 'cname2', + {'type': 'CNAME', 'ttl': 48, 'value': 'www2.example.com.'}, + ), ( 'some-host-abc123', {'type': 'A', 'ttl': 1800, 'value': '10.2.3.7'}, @@ -66,7 +70,7 @@ class TestTinyDnsFileSource(TestCase): 'exchange': 'smtp-1-host.example.com.', }, { - 'preference': 20, + 'preference': 0, 'exchange': 'smtp-2-host.example.com.', }, ], @@ -212,4 +216,4 @@ class TestTinyDnsFileSource(TestCase): got = Zone('example.com.', ['sub']) self.source.populate(got) # we don't see one www.sub.example.com. record b/c it's in a sub - self.assertEqual(23, len(got.records)) + self.assertEqual(24, len(got.records)) diff --git a/tests/zones/tinydns/example.com b/tests/zones/tinydns/example.com index 4d373e1..fcb38d4 100755 --- a/tests/zones/tinydns/example.com +++ b/tests/zones/tinydns/example.com @@ -26,14 +26,14 @@ Ccname.other.foo:www.other.foo # MX @example.com::smtp-1-host.example.com:10 -@example.com.::smtp-2-host.example.com:20 +@example.com.::smtp-2-host.example.com. # MX with ttl and ip @smtp.example.com:21.22.23.24:smtp-3-host:30:1800 @smtp.example.com.:22.23.24.25:smtp-4-host:40:1800 # NS for sub .sub.example.com::ns3.ns.com:30 -.sub.example.com.::ns4.ns.com:30 +.sub.example.com.::ns4.ns.com.:30 # NS with ip .other.example.com:14.15.16.17:ns5:30 .other.example.com.:15.16.17.18:ns6:30 diff --git a/tests/zones/tinydns/other.foo b/tests/zones/tinydns/other.foo index 82e010d..a96dee2 100644 --- a/tests/zones/tinydns/other.foo +++ b/tests/zones/tinydns/other.foo @@ -3,5 +3,6 @@ # CNAME with trailing comment Ccname.example.com:www.example.com # this is a comment +Ccname2.example.com:www2.example.com.:48 +www.other.foo:14.2.3.6