mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Add tests for TinyDNS TXT records
This commit is contained in:
@@ -20,7 +20,7 @@ class TestTinyDnsFileSource(TestCase):
|
||||
def test_populate_normal(self):
|
||||
got = Zone('example.com.', [])
|
||||
self.source.populate(got)
|
||||
self.assertEquals(11, len(got.records))
|
||||
self.assertEquals(14, len(got.records))
|
||||
|
||||
expected = Zone('example.com.', [])
|
||||
for name, data in (
|
||||
@@ -86,6 +86,21 @@ class TestTinyDnsFileSource(TestCase):
|
||||
'exchange': 'smtp-2-host.example.com.',
|
||||
}]
|
||||
}),
|
||||
('', {
|
||||
'type': 'TXT',
|
||||
'ttl': 300,
|
||||
'value': 'test TXT',
|
||||
}),
|
||||
('colon', {
|
||||
'type': 'TXT',
|
||||
'ttl': 300,
|
||||
'value': 'test : TXT',
|
||||
}),
|
||||
('nottl', {
|
||||
'type': 'TXT',
|
||||
'ttl': 3600,
|
||||
'value': 'nottl test TXT',
|
||||
}),
|
||||
):
|
||||
record = Record.new(expected, name, data)
|
||||
expected.add_record(record)
|
||||
@@ -173,4 +188,4 @@ class TestTinyDnsFileSource(TestCase):
|
||||
def test_ignores_subs(self):
|
||||
got = Zone('example.com.', ['sub'])
|
||||
self.source.populate(got)
|
||||
self.assertEquals(10, len(got.records))
|
||||
self.assertEquals(13, len(got.records))
|
||||
|
||||
@@ -46,3 +46,7 @@ Ccname.other.foo:www.other.foo
|
||||
+a1.blah-asdf.subtest.com:10.2.3.5
|
||||
+a2.blah-asdf.subtest.com:10.2.3.6
|
||||
+a3.asdf.subtest.com:10.2.3.7
|
||||
|
||||
'example.com:test TXT:300
|
||||
'colon.example.com:test \072 TXT:300
|
||||
'nottl.example.com:nottl test TXT
|
||||
|
||||
Reference in New Issue
Block a user