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

Validations to ensure Record.name and Zone.name have no whitespace

This commit is contained in:
Ross McFarland
2023-05-19 09:57:56 -07:00
parent eca3e108e3
commit cfa7abaee5
6 changed files with 39 additions and 1 deletions

View File

@@ -186,6 +186,11 @@ class TestZone(TestCase):
Zone('not.allowed', [])
self.assertTrue('missing ending dot' in str(ctx.exception))
def test_whitespace(self):
with self.assertRaises(Exception) as ctx:
Zone('space not allowed.', [])
self.assertTrue('whitespace not allowed' in str(ctx.exception))
def test_sub_zones(self):
# NS for exactly the sub is allowed