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:
@@ -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()
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user