diff --git a/designate/central/service.py b/designate/central/service.py index 4a609c226..3e5de13dc 100644 --- a/designate/central/service.py +++ b/designate/central/service.py @@ -440,7 +440,7 @@ class Service(service.RPCService): context.all_tenants = True # Create wildcard term to catch all subdomains - search_term = "*%s" % domain_name + search_term = "*.%s" % domain_name criterion = {'name': search_term} subdomains = self.storage.find_domains(context, criterion) diff --git a/designate/tests/test_central/test_service.py b/designate/tests/test_central/test_service.py index 0804aee2d..45daff134 100644 --- a/designate/tests/test_central/test_service.py +++ b/designate/tests/test_central/test_service.py @@ -179,10 +179,6 @@ class CentralServiceTest(CentralTestCase): 'www.example.net.') self.assertFalse(result) - LOG.debug("Testing 'example.org.'") - result = self.central_service._is_superdomain(context, 'example.org.') - self.assertTrue(result) - LOG.debug("Testing 'www.example.org.'") result = self.central_service._is_superdomain(context, 'www.example.org.')