Browse Source

Include a CNAMe test for url with path too

pull/873/head
Ross McFarland 4 years ago
parent
commit
99da4abd9f
No known key found for this signature in database GPG Key ID: 943B179E15D3B22A
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      tests/test_octodns_record.py

+ 10
- 0
tests/test_octodns_record.py View File

@ -2291,6 +2291,16 @@ class TestRecordValidation(TestCase):
self.assertEqual(['CNAME value "https://google.com" is not a valid '
'FQDN'], ctx.exception.reasons)
# doesn't allow urls with paths
with self.assertRaises(ValidationError) as ctx:
Record.new(self.zone, 'www', {
'type': 'CNAME',
'ttl': 600,
'value': 'https://google.com/a/b/c',
})
self.assertEqual(['CNAME value "https://google.com/a/b/c" is not a '
'valid FQDN'], ctx.exception.reasons)
# doesn't allow paths
with self.assertRaises(ValidationError) as ctx:
Record.new(self.zone, 'www', {


Loading…
Cancel
Save