mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Implement Record.rrs
This commit is contained in:
@@ -2508,6 +2508,26 @@ class TestRecord(TestCase):
|
||||
# nothing much to test, just make sure that things don't blow up
|
||||
Rr('name', 'type', 42, 'Hello World!').__repr__()
|
||||
|
||||
zone = Zone('unit.tests.', [])
|
||||
record = Record.new(
|
||||
zone,
|
||||
'a',
|
||||
{'ttl': 42, 'type': 'A', 'values': ['1.2.3.4', '2.3.4.5']},
|
||||
)
|
||||
self.assertEqual(
|
||||
('a.unit.tests.', 'A', 42, ['1.2.3.4', '2.3.4.5']), record.rrs
|
||||
)
|
||||
|
||||
record = Record.new(
|
||||
zone,
|
||||
'cname',
|
||||
{'ttl': 43, 'type': 'CNAME', 'value': 'target.unit.tests.'},
|
||||
)
|
||||
self.assertEqual(
|
||||
('cname.unit.tests.', 'CNAME', 43, ['target.unit.tests.']),
|
||||
record.rrs,
|
||||
)
|
||||
|
||||
|
||||
class TestRecordValidation(TestCase):
|
||||
zone = Zone('unit.tests.', [])
|
||||
|
||||
Reference in New Issue
Block a user