mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
add tests
This commit is contained in:
@@ -230,6 +230,20 @@ class TestBaseProvider(TestCase):
|
||||
# We filtered out the only change
|
||||
self.assertFalse(plan)
|
||||
|
||||
def test_process_desired_zone(self):
|
||||
zone1 = Zone('unit.tests.', [])
|
||||
record1 = Record.new(zone1, 'ptr', {
|
||||
'type': 'PTR',
|
||||
'ttl': 3600,
|
||||
'values': ['foo.com.', 'bar.com.'],
|
||||
})
|
||||
zone1.add_record(record1)
|
||||
|
||||
zone2 = HelperProvider('hasptr')._process_desired_zone(zone1)
|
||||
record2 = list(zone2.records)[0]
|
||||
|
||||
self.assertEqual(len(record2.values), 1)
|
||||
|
||||
def test_safe_none(self):
|
||||
# No changes is safe
|
||||
Plan(None, None, [], True).raise_if_unsafe()
|
||||
|
Reference in New Issue
Block a user