From 99da4abd9ffb00d948afef1f9a919a730ff36c32 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Fri, 4 Feb 2022 15:50:25 -0800 Subject: [PATCH] Include a CNAMe test for url with path too --- tests/test_octodns_record.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_octodns_record.py b/tests/test_octodns_record.py index 2a60c7f..b01d91a 100644 --- a/tests/test_octodns_record.py +++ b/tests/test_octodns_record.py @@ -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', {