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

Allow enabling lenient on a per-record basis with octodns.lenient

```
---
'':
    octodns:
        ignored: True
        lenient: True
    type: CNAME # not valid to have a root cname
    value: foo.com.
This commit is contained in:
Ross McFarland
2017-10-26 06:30:38 -05:00
parent 1a0055eedb
commit bf4f7dd42d
2 changed files with 14 additions and 0 deletions

View File

@@ -733,6 +733,16 @@ class TestRecordValidation(TestCase):
}, lenient=True)
self.assertEquals(('value',), ctx.exception.args)
# no exception if we're in lenient mode from config
Record.new(self.zone, 'www', {
'octodns': {
'lenient': True
},
'type': 'A',
'ttl': -1,
'value': '1.2.3.4',
}, lenient=True)
def test_A_and_values_mixin(self):
# doesn't blow up
Record.new(self.zone, '', {