1
0
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:
Ross McFarland
2022-02-08 10:26:49 -08:00
parent e0a5f4d746
commit 33a10eada4
9 changed files with 54 additions and 30 deletions

View File

@@ -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.')