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

Bump upper limit on weights

This commit is contained in:
Viranch Mehta
2021-10-12 13:04:26 -07:00
parent 98e37c6ce9
commit 8d95d05f5f
2 changed files with 3 additions and 3 deletions

View File

@@ -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:

View File

@@ -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