1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Raise exception when no yamls are found for a zone

This commit is contained in:
Viranch Mehta
2023-09-18 21:41:44 -07:00
parent 6042cb0ec5
commit 11118efe93
2 changed files with 3 additions and 5 deletions

View File

@@ -353,9 +353,7 @@ class YamlProvider(BaseProvider):
sources.append(join(self.directory, self.shared_filename))
if not sources:
self.log.info(
'populate: no YAMLs found for %s', zone.decoded_name
)
raise ProviderException(f'no YAMLs found for {zone.decoded_name}')
# determinstically order our sources
sources.sort()

View File

@@ -663,8 +663,8 @@ class TestSplitYamlProvider(TestCase):
zone = Zone('empty.', [])
# without it we see everything
source.populate(zone)
self.assertEqual(0, len(zone.records))
with self.assertRaises(ProviderException):
source.populate(zone)
def test_unsorted(self):
source = SplitYamlProvider(