Skip to content
Snippets Groups Projects
Commit b1049593 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

tests-extra: fix node type conflict with CNAME/DNAME during generation"

parent 7b6eca40
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,7 @@ def rnd_dname(enable_sub = 1):
def rnd_dnl(enable_sub = 1):
dn = rnd_dname(enable_sub)
fqdn = g_fqdn(dn)
while fqdn in CNAME_EXIST:
while fqdn.lower() in (name.lower() for name in CNAME_EXIST):
  • Contributor

    This is still not correct. You should convert name to lowercase on every {NAME_EXIST, CNAME_EXIST}.add() and convert every looked-up name to lowercase, not just CNAMEs. 43137b5b

  • Please register or sign in to reply
dn = rnd_dname(enable_sub)
fqdn = g_fqdn(dn)
NAME_EXIST.add(fqdn)
......@@ -245,7 +245,8 @@ def g_dname(rt):
# Ensure unique owners for CNAME/DNAME
dn = rnd_dname()
fqdn = g_fqdn(dn)
while (fqdn in CNAME_EXIST) or (fqdn in NAME_EXIST):
while (fqdn.lower() in (name.lower() for name in CNAME_EXIST)) or \
(fqdn in NAME_EXIST):
dn = rnd_dname()
fqdn = g_fqdn(dn)
CNAME_EXIST.add(fqdn)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment