]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix printlogs (it was broken since the pytest move).
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 14 Aug 2024 12:32:56 +0000 (14:32 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 14 Aug 2024 14:54:48 +0000 (16:54 +0200)
Also enhance it so it complains about inconsistent config dir names
and fix the existing inconsistent names. Now we can exapct log files
in our CI again.

14 files changed:
regression-tests.recursor-dnssec/printlogs.py
regression-tests.recursor-dnssec/test_Additionals.py
regression-tests.recursor-dnssec/test_ECS.py
regression-tests.recursor-dnssec/test_EDNSPadding.py
regression-tests.recursor-dnssec/test_Flags.py
regression-tests.recursor-dnssec/test_Lua.py
regression-tests.recursor-dnssec/test_Protobuf.py
regression-tests.recursor-dnssec/test_RDFlag.py
regression-tests.recursor-dnssec/test_RPZ.py
regression-tests.recursor-dnssec/test_RPZIncomplete.py
regression-tests.recursor-dnssec/test_ReadTrustAnchorsFromFile.py
regression-tests.recursor-dnssec/test_RootNXTrust.py
regression-tests.recursor-dnssec/test_TTL.py
regression-tests.recursor-dnssec/test_TrustAnchors.py

index 3058cd7ff8d2acab7db00c6b7c52e0f3c701c6b6..8533744504bbe90d97f54f4db35c02daba67e519 100755 (executable)
@@ -6,36 +6,41 @@ import os.path
 import glob
 
 e = xml.etree.ElementTree.parse('pytest.xml')
-root = e.getroot()
+testsuites = e.getroot()
 
-for child in root:
-    if len(child):
+for testsuite in testsuites:
+    if len(testsuite):
         getstdout = False
-        for elem in child:
-            if elem.tag in ["failure", "error"]:
-                cls = child.get("classname")
-                name = child.get("name")
-                if '_' not in cls or '.' not in cls:
-                    print('Unexpected classname %s; name %s' % (cls, name))
-                    getstdout = True
-                    continue
+        for testcase in testsuite:
+            cls = testcase.get("classname")
+            name = testcase.get("name")
+            if '_' not in cls or '.' not in cls:
+                print('Unexpected classname %s; name %s' % (cls, name))
+                getstdout = True
+                continue
 
-                confdirnames = [cls.split('_')[1].split('.')[0], cls.split('.')[1].split('Test')[0]]
-                for confdirname in confdirnames:
-                    confdir = os.path.join("configs", confdirname)
-                    recursorlog = os.path.join(confdir, "recursor.log")
-                    if os.path.exists(recursorlog):
-                        print("==============> %s <==============" % recursorlog)
-                        with open(recursorlog) as f:
-                            print(''.join(f.readlines()))
-                            authdirs = glob.glob(os.path.join(confdir, "auth-*"))
-                            for authdir in authdirs:
-                                authlog = os.path.join(authdir, "pdns.log")
-                                if os.path.exists(recursorlog):
-                                    print("==============> %s <==============" % authlog)
-                                    with open(authlog) as f:
-                                        print(''.join(f.readlines()))
-            if getstdout and elem.tag == 'system-out':
-                print("==============> STDOUT LOG FROM XML <==============")
-                print(elem.text)
-                print("==============> END STDOUT LOG FROM XML <==============")
+            confdirnames = [cls.split('_')[1].split('.')[0], cls.split('.')[1].split('Test')[0]]
+            found = False
+            for confdirname in confdirnames:
+                confdir = os.path.join("configs", confdirname)
+                recursorlog = os.path.join(confdir, "recursor.log")
+                if os.path.exists(recursorlog):
+                    found = True
+                    for elem in testcase:
+                        if elem.tag in ["failure", "error"]:
+                            print("==============> %s <==============" % recursorlog)
+                            with open(recursorlog) as f:
+                                print(''.join(f.readlines()))
+                                authdirs = glob.glob(os.path.join(confdir, "auth-*"))
+                                for authdir in authdirs:
+                                    authlog = os.path.join(authdir, "pdns.log")
+                                    if os.path.exists(recursorlog):
+                                        print("==============> %s <==============" % authlog)
+                                        with open(authlog) as f:
+                                            print(''.join(f.readlines()))
+            if not found and confdirnames[0] != 'Flags': 
+                print("%s not found, configdir does not mach expected pattern" % confdirnames)
+        if getstdout and elem.tag == 'system-out':
+            print("==============> STDOUT LOG FROM XML <==============")
+            print(elem.text)
+            print("==============> END STDOUT LOG FROM XML <==============")
index 49a14d081b91a8aace492aceb833e4cb7bf81d98..b09bf3e21d99873fea23cc9f678f6c2b9bb1473c 100644 (file)
@@ -2,7 +2,7 @@ import dns
 import os
 from recursortests import RecursorTest
 
-class testAdditionalsDefault(RecursorTest):
+class AdditionalsDefaultTest(RecursorTest):
     _confdir = 'AdditionalsDefault'
 
     _config_template = """
@@ -40,7 +40,7 @@ class testAdditionalsDefault(RecursorTest):
         self.assertRRsetInAdditional(res, adds1)
         self.assertRRsetInAdditional(res, adds2)
 
-class testAdditionalsResolveImmediately(RecursorTest):
+class AdditionalsResolveImmediatelyTest(RecursorTest):
     _confdir = 'AdditionalsResolveImmediately'
     _config_template = """
     dnssec=validate
@@ -102,7 +102,7 @@ class testAdditionalsResolveImmediately(RecursorTest):
         self.assertRRsetInAdditional(res, adds7)
         self.assertMatchingRRSIGInAdditional(res, adds7)
 
-class testAdditionalsResolveCacheOnly(RecursorTest):
+class AdditionalsResolveCacheOnlyTest(RecursorTest):
     _confdir = 'AdditionalsResolveCacheOnly'
     _config_template = """
     dnssec=validate
index 29a75cf1e24c6a1efba166bc784be7e2458bd161..77710243ee223098565c63c26c61347e65434fc1 100644 (file)
@@ -116,7 +116,7 @@ ecs-add-for=0.0.0.0/0
     def tearDownClass(cls):
         cls.tearDownRecursor()
 
-class testNoECS(ECSTest):
+class NoECSTest(ECSTest):
     _confdir = 'NoECS'
 
     _config_template = """edns-subnet-allow-list=
@@ -141,7 +141,7 @@ forward-zones=ecs-echo.example=%s.21
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected)
 
-class testIncomingNoECS(ECSTest):
+class IncomingNoECSTest(ECSTest):
     _confdir = 'IncomingNoECS'
 
     _config_template = """edns-subnet-allow-list=
@@ -169,7 +169,7 @@ forward-zones=ecs-echo.example=%s.21
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected, scopeZeroResponse=True)
 
-class testECSByName(ECSTest):
+class ECSByNameTest(ECSTest):
     _confdir = 'ECSByName'
 
     _config_template = """edns-subnet-allow-list=ecs-echo.example.
@@ -200,7 +200,7 @@ forward-zones=ecs-echo.example=%s.21
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected)
 
-class testECSByNameLarger(ECSTest):
+class ECSByNameLargerTest(ECSTest):
     _confdir = 'ECSByNameLarger'
 
     _config_template = """edns-subnet-allow-list=ecs-echo.example.
@@ -234,8 +234,8 @@ ecs-ipv6-cache-bits=128
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected)
 
-class testECSByNameSmaller(ECSTest):
-    _confdir = 'ECSByNameLarger'
+class ECSByNameSmallerTest(ECSTest):
+    _confdir = 'ECSByNameSmaller'
 
     _config_template = """edns-subnet-allow-list=ecs-echo.example.
 ecs-ipv4-bits=16
@@ -261,8 +261,8 @@ forward-zones=ecs-echo.example=%s.21
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected)
 
-class testIncomingECSByName(ECSTest):
-    _confdir = 'ECSIncomingByName'
+class IncomingECSByNameTest(ECSTest):
+    _confdir = 'IncomingECSByName'
 
     _config_template = """edns-subnet-allow-list=ecs-echo.example.
 use-incoming-edns-subnet=yes
@@ -301,8 +301,8 @@ ecs-ipv6-cache-bits=128
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected, ttlECS)
 
-class testIncomingECSByNameLarger(ECSTest):
-    _confdir = 'ECSIncomingByNameLarger'
+class IncomingECSByNameLargerTest(ECSTest):
+    _confdir = 'IncomingECSByNameLarger'
 
     _config_template = """edns-subnet-allow-list=ecs-echo.example.
 use-incoming-edns-subnet=yes
@@ -333,8 +333,8 @@ ecs-ipv6-cache-bits=128
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected, ttlECS)
 
-class testIncomingECSByNameSmaller(ECSTest):
-    _confdir = 'ECSIncomingByNameSmaller'
+class IncomingECSByNameSmallerTest(ECSTest):
+    _confdir = 'IncomingECSByNameSmaller'
 
     _config_template = """edns-subnet-allow-list=ecs-echo.example.
 use-incoming-edns-subnet=yes
@@ -364,8 +364,8 @@ ecs-ipv6-cache-bits=128
         self.sendECSQuery(query, expected, ttlECS)
 
 @unittest.skipIf(not have_ipv6(), "No IPv6")
-class testIncomingECSByNameV6(ECSTest):
-    _confdir = 'ECSIncomingByNameV6'
+class IncomingECSByNameV6Test(ECSTest):
+    _confdir = 'IncomingECSByNameV6'
 
     _config_template = """edns-subnet-allow-list=ecs-echo.example.
 use-incoming-edns-subnet=yes
@@ -397,7 +397,7 @@ forward-zones=ecs-echo.example=[::1]:53000
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected, ttlECS)
 
-class testECSNameMismatch(ECSTest):
+class ECSNameMismatchTest(ECSTest):
     _confdir = 'ECSNameMismatch'
 
     _config_template = """edns-subnet-allow-list=not-the-right-name.example.
@@ -422,7 +422,7 @@ forward-zones=ecs-echo.example=%s.21
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected)
 
-class testECSByIP(ECSTest):
+class ECSByIPTest(ECSTest):
     _confdir = 'ECSByIP'
 
     _config_template = """edns-subnet-allow-list=%s.21
@@ -448,8 +448,8 @@ forward-zones=ecs-echo.example=%s.21
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected)
 
-class testIncomingECSByIP(ECSTest):
-    _confdir = 'ECSIncomingByIP'
+class IncomingECSByIPTest(ECSTest):
+    _confdir = 'IncomingECSByIP'
 
     _config_template = """edns-subnet-allow-list=%s.21
 use-incoming-edns-subnet=yes
@@ -488,7 +488,7 @@ ecs-ipv6-cache-bits=128
 
         self.sendECSQuery(query, expected)
 
-class testECSIPMismatch(ECSTest):
+class ECSIPMismatchTest(ECSTest):
     _confdir = 'ECSIPMismatch'
 
     _config_template = """edns-subnet-allow-list=192.0.2.1
@@ -514,8 +514,8 @@ forward-zones=ecs-echo.example=%s.21
         query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
         self.sendECSQuery(query, expected)
 
-class testECSWithProxyProtocoldRecursorTest(ECSTest):
-    _confdir = 'ECSWithProxyProtocol'
+class ECSWithProxyProtocolRecursorTest(ECSTest):
+    _confdir = 'ECSWithProxyProtocolRecursor'
     _config_template = """
     ecs-add-for=2001:db8::1/128
     edns-subnet-allow-list=ecs-echo.example.
@@ -535,7 +535,7 @@ class testECSWithProxyProtocoldRecursorTest(ECSTest):
             self.assertRcodeEqual(res, dns.rcode.NOERROR)
             self.assertRRsetInAnswer(res, expected)
 
-class testTooLargeToAddZeroScope(RecursorTest):
+class TooLargeToAddZeroScopeTest(RecursorTest):
 
     _confdir = 'TooLargeToAddZeroScope'
     _config_template = """
@@ -573,7 +573,7 @@ dnssec=validate
 
     @classmethod
     def generateRecursorConfig(cls, confdir):
-        super(testTooLargeToAddZeroScope, cls).generateRecursorConfig(confdir)
+        super(TooLargeToAddZeroScopeTest, cls).generateRecursorConfig(confdir)
 
     def testTooLarge(self):
         qname = 'toolarge.ecs.'
index e9645aaf7aea502e9451aa3d2757f5dcdb5fc1bc..55de943a1ad65e688dda0aa6cc52a8e26d032d39 100644 (file)
@@ -9,6 +9,8 @@ from recursortests import RecursorTest
 
 class RecursorEDNSPaddingTest(RecursorTest):
 
+    _confdir = 'RecursorEDNSPadding'
+
     @classmethod
     def setUpClass(cls):
         cls.setUpSockets()
@@ -209,7 +211,7 @@ packetcache-ttl=60
 
 class PaddingNotAllowedAlwaysTest(RecursorEDNSPaddingTest):
 
-    _confdir = 'PaddingAlwaysNotAllowed'
+    _confdir = 'PaddingNotAllowedAlways'
     _config_template = """edns-padding-from=127.0.0.2
 edns-padding-mode=always
 edns-padding-tag=7830
@@ -299,7 +301,7 @@ class PaddingAllowedAlwaysSameTagTest(RecursorEDNSPaddingTest):
     # we use the default tag (0) for padded responses, which will cause
     # the same packet cache entry (with padding ) to be returned to a client
     # not allowed by the edns-padding-from list
-    _confdir = 'PaddingAlwaysSameTag'
+    _confdir = 'PaddingAllowedAlwaysSameTag'
     _config_template = """edns-padding-from=127.0.0.1
 edns-padding-mode=always
 edns-padding-tag=0
index a550b9001d52aa13d16c59605779120b6da1938f..702d44de1d970bf46edc2db0c9cf5c61291a3409 100644 (file)
@@ -5,7 +5,7 @@ import dns
 from recursortests import RecursorTest
 
 
-class TestFlags(RecursorTest):
+class FlagsTest(RecursorTest):
     _confdir = 'Flags'
     _config_template = """dnssec=%s"""
     _config_params = ['_dnssec_setting']
index dad74051f5d687abc1ccdbefa5e2be0fc2bab903..23750b4caa7263ddbad95953ba2bc465e0c66eb2 100644 (file)
@@ -11,7 +11,7 @@ from twisted.internet import reactor
 from recursortests import RecursorTest
 
 class GettagRecursorTest(RecursorTest):
-    _confdir = 'LuaGettag'
+    _confdir = 'GettagRecursor'
     _config_template = """
     log-common-errors=yes
     gettag-needs-edns-options=yes
@@ -209,7 +209,7 @@ class GettagRecursorTest(RecursorTest):
         self.assertResponseMatches(query, expected, res)
 
 class GettagRecursorDistributesQueriesTest(GettagRecursorTest):
-    _confdir = 'LuaGettagDistributes'
+    _confdir = 'GettagRecursorDistributesQueries'
     _config_template = """
     log-common-errors=yes
     gettag-needs-edns-options=yes
@@ -247,7 +247,7 @@ class UDPHooksResponder(DatagramProtocol):
         self.transport.write(response.to_wire(), address)
 
 class LuaHooksRecursorTest(RecursorTest):
-    _confdir = 'LuaHooks'
+    _confdir = 'LuaHooksRecursor'
     _config_template = """
 forward-zones=luahooks.example=%s.23
 log-common-errors=yes
@@ -446,7 +446,7 @@ quiet=no
             self.assertRcodeEqual(res, dns.rcode.NOERROR)
 
 class LuaHooksRecursorDistributesTest(LuaHooksRecursorTest):
-    _confdir = 'LuaHooksDistributes'
+    _confdir = 'LuaHooksRecursorDistributes'
     _config_template = """
 forward-zones=luahooks.example=%s.23
 log-common-errors=yes
@@ -458,7 +458,7 @@ quiet=no
 class LuaDNS64Test(RecursorTest):
     """Tests the dq.followupAction("getFakeAAAARecords")"""
 
-    _confdir = 'lua-dns64'
+    _confdir = 'LuaDNS64'
     _config_template = """
     """
     _lua_dns_script_file = """
@@ -519,7 +519,7 @@ class GettagFFIDNS64Test(RecursorTest):
        - DNS64 should kick in, generating an AAAA
     """
 
-    _confdir = 'gettagffi-rpz-dns64'
+    _confdir = 'GettagFFIDNS64'
     _config_template = """
     dns64-prefix=64:ff9b::/96
     """
@@ -572,7 +572,7 @@ dns64.test.powerdns.com.zone.rpz. 60 IN A 192.0.2.42
 class PDNSRandomTest(RecursorTest):
     """Tests if pdnsrandom works"""
 
-    _confdir = 'pdnsrandom'
+    _confdir = 'PDNSRandom'
     _config_template = """
     """
     _lua_dns_script_file = """
@@ -600,7 +600,7 @@ class PDNSRandomTest(RecursorTest):
 class PDNSFeaturesTest(RecursorTest):
     """Tests if pdns_features works"""
 
-    _confdir = 'pdnsfeatures'
+    _confdir = 'PDNSFeatures'
     _config_template = """
     """
     _lua_dns_script_file = """
@@ -628,7 +628,7 @@ class PDNSFeaturesTest(RecursorTest):
 class PDNSGeneratingAnswerFromGettagTest(RecursorTest):
     """Tests that we can generate answers from gettag"""
 
-    _confdir = 'gettaganswers'
+    _confdir = 'PDNSGeneratingAnswerFromGettag'
     _config_template = """
     """
     _lua_dns_script_file = """
@@ -685,7 +685,7 @@ class PDNSGeneratingAnswerFromGettagTest(RecursorTest):
 class PDNSValidationStatesTest(RecursorTest):
     """Tests that we have access to the validation states from Lua"""
 
-    _confdir = 'validation-states-from-lua'
+    _confdir = 'PDNSValidationStates'
     _config_template = """
 dnssec=validate
 """
@@ -751,7 +751,7 @@ class PolicyEventFilterOnFollowUpTest(RecursorTest):
     """Tests the interaction between RPZ and followup queries (dns64, followCNAME)
     """
 
-    _confdir = 'policyeventfilter-followup'
+    _confdir = 'PolicyEventFilterOnFollowUp'
     _config_template = """
     """
     _lua_config_file = """
@@ -802,7 +802,7 @@ class PolicyEventFilterOnFollowUpWithNativeDNS64Test(RecursorTest):
     """Tests the interaction between followup queries and native dns64
     """
 
-    _confdir = 'policyeventfilter-followup-dns64'
+    _confdir = 'PolicyEventFilterOnFollowUpWithNativeDNS64'
     _config_template = """
     dns64-prefix=1234::/96
     """
@@ -838,7 +838,7 @@ class PolicyEventFilterOnFollowUpWithNativeDNS64Test(RecursorTest):
 class LuaPostResolveFFITest(RecursorTest):
     """Tests postresolve_ffi interface"""
 
-    _confdir = 'LuaPostResolveFFITest'
+    _confdir = 'LuaPostResolveFFI'
     _config_template = """
     """
     _lua_dns_script_file = """
index 6f78f84d30e5f2486e65d469083f4f6e6df0774c..db6828dfb3d1780894c50c984a417123ed5bf95b 100644 (file)
@@ -386,7 +386,7 @@ class ProtobufProxyMappingTest(TestRecursorProtobuf):
     This test makes sure that we correctly export queries and response over protobuf with a proxyMapping
     """
 
-    _confdir = 'ProtobufProxyMappingTest'
+    _confdir = 'ProtobufProxyMapping'
     _config_template = """
     auth-zones=example=configs/%s/example.zone
     allow-from=3.4.5.0/24
@@ -424,7 +424,7 @@ class ProtobufProxyMappingLogMappedTest(TestRecursorProtobuf):
     This test makes sure that we correctly export queries and response over protobuf.
     """
 
-    _confdir = 'ProtobufProxyMappingLogMappedTest'
+    _confdir = 'ProtobufProxyMappingLogMapped'
     _config_template = """
     auth-zones=example=configs/%s/example.zone
     allow-from=3.4.5.0/0"
@@ -643,7 +643,7 @@ class OutgoingProtobufWithECSMappingTest(TestRecursorProtobuf):
     that the recursor at least connects to the protobuf server.
     """
 
-    _confdir = 'OutgoingProtobuffWithECSMapping'
+    _confdir = 'OutgoingProtobufWithECSMapping'
     _config_template = """
     # Switch off QName Minimization, it generates much more protobuf messages
     # (or make the test much more smart!)
@@ -1532,7 +1532,7 @@ class ProtobufMetaFFITest(TestRecursorProtobuf):
     """
     This test makes sure that we can correctly add extra meta fields (FFI version).
     """
-    _confdir = 'ProtobufMetaFFITest'
+    _confdir = 'ProtobufMetaFFI'
     _config_template = """
 auth-zones=example=configs/%s/example.zone""" % _confdir
     _lua_config_file = """
index 16f50d2afe84c0bc7853256e5535de2df7418cdd..85ce958b1d240caed9ddc4dc2aa3a79498c32cab 100644 (file)
@@ -2,8 +2,8 @@ import dns
 import os
 from recursortests import RecursorTest
 
-class testRDNotAllowed(RecursorTest):
-    _confdir = 'RDFlagNotAllowed'
+class RDNotAllowedTest(RecursorTest):
+    _confdir = 'RDNotAllowed'
 
     _config_template = """
 """
@@ -17,8 +17,8 @@ class testRDNotAllowed(RecursorTest):
         self.assertRcodeEqual(res, dns.rcode.REFUSED)
         self.assertAnswerEmpty(res)
 
-class testRDAllowed(RecursorTest):
-    _confdir = 'RDFlagAllowed'
+class RDAllowedTest(RecursorTest):
+    _confdir = 'RDAllowed'
 
     _config_template = """
     disable-packetcache=yes
index 3ac9f0683ef0b9e981fd587efbd3fe5506f6f499..832989b1a5f939ff8e125cf133b83744e5bca627 100644 (file)
@@ -387,7 +387,7 @@ class RPZXFRRecursorTest(RPZRecursorTest):
     -- The first server is a bogus one, to test that we correctly fail over to the second one
     rpzMaster({'127.0.0.1:9999', '127.0.0.1:%d'}, 'zone.rpz.', { refresh=1, includeSOA=true})
     """ % (rpzServerPort)
-    _confdir = 'RPZXFR'
+    _confdir = 'RPZXFRRecursor'
     _wsPort = 8042
     _wsTimeout = 2
     _wsPassword = 'secretpassword'
@@ -564,7 +564,7 @@ class RPZFileRecursorTest(RPZRecursorTest):
     This test makes sure that we correctly load RPZ zones from a file
     """
 
-    _confdir = 'RPZFile'
+    _confdir = 'RPZFileRecursor'
     _lua_config_file = """
     rpzFile('configs/%s/zone.rpz', { policyName="zone.rpz.", includeSOA=true })
     """ % (_confdir)
@@ -618,7 +618,7 @@ class RPZFileDefaultPolRecursorTest(RPZRecursorTest):
     This test makes sure that we correctly load RPZ zones from a file with a default policy
     """
 
-    _confdir = 'RPZFileDefaultPolicy'
+    _confdir = 'RPZFileDefaultPolRecursor'
     _lua_config_file = """
     rpzFile('configs/%s/zone.rpz', { policyName="zone.rpz.", defpol=Policy.NoAction })
     """ % (_confdir)
@@ -671,7 +671,7 @@ class RPZFileDefaultPolNotOverrideLocalRecursorTest(RPZRecursorTest):
     This test makes sure that we correctly load RPZ zones from a file with a default policy, not overriding local data entries
     """
 
-    _confdir = 'RPZFileDefaultPolicyNotOverrideLocal'
+    _confdir = 'RPZFileDefaultPolNotOverrideLocalRecursor'
     _lua_config_file = """
     rpzFile('configs/%s/zone.rpz', { policyName="zone.rpz.", defpol=Policy.NoAction, defpolOverrideLocalData=false })
     """ % (_confdir)
@@ -775,7 +775,7 @@ class RPZOrderingPrecedenceRecursorTest(RPZRecursorTest):
     This test makes sure that the recursor respects the RPZ ordering precedence rules
     """
 
-    _confdir = 'RPZOrderingPrecedence'
+    _confdir = 'RPZOrderingPrecedenceRecursor'
     _lua_config_file = """
     rpzFile('configs/%s/zone.rpz', { policyName="zone.rpz."})
     rpzFile('configs/%s/zone2.rpz', { policyName="zone2.rpz."})
@@ -1040,7 +1040,7 @@ class RPZFileModByLuaRecursorTest(RPZRecursorTest):
     This test makes sure that we correctly load RPZ zones from a file while being modified by Lua callbacks
     """
 
-    _confdir = 'RPZFileModByLua'
+    _confdir = 'RPZFileModByLuaRecursor'
     _lua_dns_script_file = """
     function preresolve(dq)
       if dq.qname:equal('zmod.example.') then
index baeb2db053d0dfd87df54487b36ea21fcd41f076..647a7ab090b3c4d0d90858357306b1e355e2e469 100644 (file)
@@ -129,7 +129,7 @@ class RPZIncompleteRecursorTest(RecursorTest):
     _wsTimeout = 2
     _wsPassword = 'secretpassword'
     _apiKey = 'secretapikey'
-    _confdir = 'RPZIncomplete'
+    _confdir = 'RPZIncompleteRecursor'
     _auth_zones = {
         '8': {'threads': 1,
               'zones': ['ROOT']},
@@ -179,7 +179,7 @@ class RPZXFRIncompleteRecursorTest(RPZIncompleteRecursorTest):
     -- The first server is a bogus one, to test that we correctly fail over to the second one
     rpzMaster({'127.0.0.1:9999', '127.0.0.1:%d'}, 'zone.rpz.', { refresh=1 })
     """ % (badrpzServerPort)
-    _confdir = 'RPZXFRIncomplete'
+    _confdir = 'RPZXFRIncompleteRecursor'
     _wsPort = 8042
     _wsTimeout = 2
     _wsPassword = 'secretpassword'
index c1a25747c1eb961b370cc00fdbc2756758a2cdb8..16bca4e83e2e5b5e77fcd46a979b2a6342738cfb 100644 (file)
@@ -4,8 +4,8 @@ import subprocess
 from recursortests import RecursorTest
 
 
-class testReadTrustAnchorsFromFile(RecursorTest):
-    _confdir = 'ReadTAsFromFile'
+class ReadTrustAnchorsFromFileTest(RecursorTest):
+    _confdir = 'ReadTrustAnchorsFromFile'
 
     _config_template = """dnssec=validate"""
     _lua_config_file = """clearTA()
index cb1133641b3e8114101e74931a407c23fd6a929c..2925c2a6fe83a151a5e5e95b78d79213226861f6 100644 (file)
@@ -33,7 +33,7 @@ class RootNXTrustRecursorTest(RecursorTest):
             if outgoing1 == outgoing2:
                 break
 
-class testRootNXTrustDisabled(RootNXTrustRecursorTest):
+class RootNXTrustDisabledTest(RootNXTrustRecursorTest):
     _confdir = 'RootNXTrustDisabled'
     _wsPort = 8042
     _wsTimeout = 2
@@ -86,7 +86,7 @@ extended-resolution-errors
         self.assertEqual(res.edns, 0)
         self.assertEqual(len(res.options), 0)
 
-class testRootNXTrustEnabled(RootNXTrustRecursorTest):
+class RootNXTrustEnabledTest(RootNXTrustRecursorTest):
     _confdir = 'RootNXTrustEnabled'
     _wsPort = 8042
     _wsTimeout = 2
index 3c1d78f51768f21e11c27d810ca20f3342c9e954..7e30c1a657d05decaed0c35e1c83cded457c5726 100644 (file)
@@ -2,7 +2,7 @@ import dns
 import os
 from recursortests import RecursorTest
 
-class testBogusMaxTTL(RecursorTest):
+class BogusMaxTTLTest(RecursorTest):
     _confdir = 'BogusMaxTTL'
 
     _config_template = """dnssec=validate
index f44497881aba4f1fc17ea98dc8891848521dd010..4d3211873d5f0b6725bcd7939ef5e35e4beb97eb 100644 (file)
@@ -2,7 +2,7 @@ import dns
 from recursortests import RecursorTest
 
 
-class testTrustAnchorsEnabled(RecursorTest):
+class TrustAnchorsEnabledTest(RecursorTest):
     """This test will do a query for "trustanchor.server CH TXT" and hopes to get
     a proper answer"""
 
@@ -42,7 +42,7 @@ addNTA("example.com", "some reason")
         self.assertRRsetInAnswer(result, expected)
 
 
-class testTrustAnchorsDisabled(RecursorTest):
+class TrustAnchorsDisabledTest(RecursorTest):
     """This test will do a query for "trustanchor.server CH TXT" and hopes to get
     a proper answer"""