mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Base support for managing root NS records
* Zone object no longer treats them special, some tests needed adjusting b/c of this, some provider's tests may also need adjusting, though they should not plan changes since they won't (yet) have SUPPORTS_ROOT_NS * _process_desired_zone filters and warns when not supported * YamlProvider supports them * TinyDnsBaseSource supports them
This commit is contained in:
@@ -120,12 +120,12 @@ class TestManager(TestCase):
|
||||
environ['YAML_TMP_DIR'] = tmpdir.dirname
|
||||
tc = Manager(get_config_filename('simple.yaml')) \
|
||||
.sync(dry_run=False)
|
||||
self.assertEqual(26, tc)
|
||||
self.assertEqual(27, tc)
|
||||
|
||||
# try with just one of the zones
|
||||
tc = Manager(get_config_filename('simple.yaml')) \
|
||||
.sync(dry_run=False, eligible_zones=['unit.tests.'])
|
||||
self.assertEqual(20, tc)
|
||||
self.assertEqual(21, tc)
|
||||
|
||||
# the subzone, with 2 targets
|
||||
tc = Manager(get_config_filename('simple.yaml')) \
|
||||
@@ -140,18 +140,18 @@ class TestManager(TestCase):
|
||||
# Again with force
|
||||
tc = Manager(get_config_filename('simple.yaml')) \
|
||||
.sync(dry_run=False, force=True)
|
||||
self.assertEqual(26, tc)
|
||||
self.assertEqual(27, tc)
|
||||
|
||||
# Again with max_workers = 1
|
||||
tc = Manager(get_config_filename('simple.yaml'), max_workers=1) \
|
||||
.sync(dry_run=False, force=True)
|
||||
self.assertEqual(26, tc)
|
||||
self.assertEqual(27, tc)
|
||||
|
||||
# Include meta
|
||||
tc = Manager(get_config_filename('simple.yaml'), max_workers=1,
|
||||
include_meta=True) \
|
||||
.sync(dry_run=False, force=True)
|
||||
self.assertEqual(30, tc)
|
||||
self.assertEqual(31, tc)
|
||||
|
||||
def test_eligible_sources(self):
|
||||
with TemporaryDirectory() as tmpdir:
|
||||
@@ -217,13 +217,13 @@ class TestManager(TestCase):
|
||||
fh.write('---\n{}')
|
||||
|
||||
changes = manager.compare(['in'], ['dump'], 'unit.tests.')
|
||||
self.assertEqual(20, len(changes))
|
||||
self.assertEqual(21, len(changes))
|
||||
|
||||
# Compound sources with varying support
|
||||
changes = manager.compare(['in', 'nosshfp'],
|
||||
['dump'],
|
||||
'unit.tests.')
|
||||
self.assertEqual(19, len(changes))
|
||||
self.assertEqual(20, len(changes))
|
||||
|
||||
with self.assertRaises(ManagerException) as ctx:
|
||||
manager.compare(['nope'], ['dump'], 'unit.tests.')
|
||||
|
||||
Reference in New Issue
Block a user