From 885126d48fa2f9b21784048281656ce33d50e06c Mon Sep 17 00:00:00 2001 From: Matt Cholick Date: Wed, 10 Apr 2024 12:42:40 -0700 Subject: [PATCH] Additional test checking Zone threshold defaults to None --- tests/config/zone-threshold.yaml | 6 ++++++ tests/test_octodns_manager.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/config/zone-threshold.yaml b/tests/config/zone-threshold.yaml index 0598555..3479841 100644 --- a/tests/config/zone-threshold.yaml +++ b/tests/config/zone-threshold.yaml @@ -26,3 +26,9 @@ zones: - in targets: - dump + + defaultthresholds.tests.: + sources: + - in + targets: + - dump diff --git a/tests/test_octodns_manager.py b/tests/test_octodns_manager.py index 6ed972f..271268d 100644 --- a/tests/test_octodns_manager.py +++ b/tests/test_octodns_manager.py @@ -1311,6 +1311,12 @@ class TestManager(TestCase): self.assertEqual(0.02, subzone.update_pcent_threshold) self.assertEqual(0.01, subzone.delete_pcent_threshold) + # test default of None to ensure Provider precedence + zone_with_defaults = manager.get_zone('defaultthresholds.tests.') + + self.assertIsNone(zone_with_defaults.update_pcent_threshold) + self.assertIsNone(zone_with_defaults.delete_pcent_threshold) + class TestMainThreadExecutor(TestCase): def test_success(self):