Browse Source

Merge branch 'main' into checksumming

pull/1124/head
Ross McFarland 2 years ago
committed by GitHub
parent
commit
d35022b9dc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions
  1. +1
    -0
      README.md
  2. +5
    -0
      octodns/manager.py
  3. +7
    -0
      tests/test_octodns_manager.py

+ 1
- 0
README.md View File

@ -446,6 +446,7 @@ If you have a problem or suggestion, please [open an issue](https://github.com/o
## Related Projects and Resources
- **GitHub Action:** [octoDNS-Sync](https://github.com/marketplace/actions/octodns-sync)
- **NixOS Integration:** [NixOS-DNS](https://github.com/Janik-Haag/nixos-dns/)
- **Sample Implementations.** See how others are using it
- [`hackclub/dns`](https://github.com/hackclub/dns)
- [`kubernetes/k8s.io:/dns`](https://github.com/kubernetes/k8s.io/tree/main/dns)


+ 5
- 0
octodns/manager.py View File

@ -620,7 +620,12 @@ class Manager(object):
aliased_zones = {}
delayed_arpa = []
futures = []
for zone_name, config in zones.items():
if config is None:
raise ManagerException(
f'Requested zone "{zone_name}" not found in config'
)
decoded_zone_name = idna_decode(zone_name)
self.log.info('sync: zone=%s', decoded_zone_name)
if 'alias' in config:


+ 7
- 0
tests/test_octodns_manager.py View File

@ -79,6 +79,13 @@ class TestManager(TestCase):
)
self.assertTrue('missing sources' in str(ctx.exception))
def test_missing_zone(self):
with self.assertRaises(ManagerException) as ctx:
Manager(get_config_filename('dynamic-config.yaml')).sync(
['missing.zones.']
)
self.assertTrue('Requested zone ' in str(ctx.exception))
def test_missing_targets(self):
with self.assertRaises(ManagerException) as ctx:
Manager(get_config_filename('provider-problems.yaml')).sync(


Loading…
Cancel
Save