From 8d95d05f5f3c1162e98010f8c66d79bb45a64d92 Mon Sep 17 00:00:00 2001 From: Viranch Mehta Date: Tue, 12 Oct 2021 13:04:26 -0700 Subject: [PATCH] Bump upper limit on weights --- octodns/record/__init__.py | 2 +- tests/test_octodns_record.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/octodns/record/__init__.py b/octodns/record/__init__.py index 0545e79..9492eb9 100644 --- a/octodns/record/__init__.py +++ b/octodns/record/__init__.py @@ -557,7 +557,7 @@ class _DynamicMixin(object): try: weight = value['weight'] weight = int(weight) - if weight < 1 or weight > 15: + if weight < 1 or weight > 100: reasons.append(f'invalid weight "{weight}" in ' f'pool "{_id}" value {value_num}') except KeyError: diff --git a/tests/test_octodns_record.py b/tests/test_octodns_record.py index 68d3d61..1a4a58c 100644 --- a/tests/test_octodns_record.py +++ b/tests/test_octodns_record.py @@ -3895,7 +3895,7 @@ class TestDynamicRecords(TestCase): 'weight': 1, 'value': '6.6.6.6', }, { - 'weight': 16, + 'weight': 101, 'value': '7.7.7.7', }], }, @@ -3919,7 +3919,7 @@ class TestDynamicRecords(TestCase): } with self.assertRaises(ValidationError) as ctx: Record.new(self.zone, 'bad', a_data) - self.assertEquals(['invalid weight "16" in pool "three" value 2'], + self.assertEquals(['invalid weight "101" in pool "three" value 2'], ctx.exception.reasons) # invalid non-int weight