From: Otto Moerbeek Date: Tue, 27 Aug 2024 12:35:48 +0000 (+0200) Subject: rec: make sure names of classes and confdirs are consistent in regr tests X-Git-Tag: rec-5.2.0-alpha1~121^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5dbd0b36c7f86d8029f8e48df2b8b5610eb397e;p=thirdparty%2Fpdns.git rec: make sure names of classes and confdirs are consistent in regr tests Otherwise printlogs.py does not work as expected --- diff --git a/regression-tests.recursor-dnssec/recursortests.py b/regression-tests.recursor-dnssec/recursortests.py index 1385c12811..63fa230ead 100644 --- a/regression-tests.recursor-dnssec/recursortests.py +++ b/regression-tests.recursor-dnssec/recursortests.py @@ -610,8 +610,14 @@ distributor-threads={threads}""".format(confdir=confdir, print(f"*** End startAuth log for {logFile} ***") raise AssertionError('%s failed (%d)' % (authcmd, cls._auths[ipaddress].returncode)) + @classmethod + def checkConfdir(cls, confdir): + if cls.__name__ != 'FlagsTest' and os.path.basename(confdir) + 'Test' != cls.__name__: + raise AssertionError('conf dir ' + confdir + ' and ' + cls.__name__ + ' inconsistent with convention') + @classmethod def generateRecursorConfig(cls, confdir): + cls.checkConfdir(confdir) params = tuple([getattr(cls, param) for param in cls._config_params]) if len(params): print(params) @@ -645,6 +651,7 @@ distributor-threads={threads}""".format(confdir=confdir, @classmethod def generateRecursorYamlConfig(cls, confdir, luaConfig=True): + cls.checkConfdir(confdir) params = tuple([getattr(cls, param) for param in cls._config_params]) if len(params): print(params) diff --git a/regression-tests.recursor-dnssec/test_API.py b/regression-tests.recursor-dnssec/test_API.py index 07fc05aa15..90a6fc08ce 100644 --- a/regression-tests.recursor-dnssec/test_API.py +++ b/regression-tests.recursor-dnssec/test_API.py @@ -23,7 +23,7 @@ class APIRecursorTest(RecursorTest): cls.tearDownRecursor() class APIAllowedRecursorTest(APIRecursorTest): - _confdir = 'API' + _confdir = 'APIAllowedRecursor' _wsPort = 8042 _wsTimeout = 2 _wsPassword = 'secretpassword' @@ -48,7 +48,7 @@ api-key=%s self.assertTrue(r.json()) class APIDeniedRecursorTest(APIRecursorTest): - _confdir = 'API' + _confdir = 'APIDeniedRecursor' _wsPort = 8042 _wsTimeout = 2 _wsPassword = 'secretpassword' diff --git a/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py b/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py index 88be185500..fb1f046e93 100644 --- a/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py +++ b/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py @@ -97,7 +97,7 @@ class AggressiveNSECCacheBase(RecursorTest): self.assertEqual(res.options[0].otype, 15) self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) -class AggressiveNSECCacheNSEC(AggressiveNSECCacheBase): +class AggressiveNSECCacheNSECTest(AggressiveNSECCacheBase): _confdir = 'AggressiveNSECCacheNSEC' __test__ = True @@ -235,7 +235,7 @@ class AggressiveNSECCacheNSEC(AggressiveNSECCacheBase): self.assertEqual(res.options[0].otype, 15) self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(9, b'')) -class AggressiveNSECCacheNSEC3(AggressiveNSECCacheBase): +class AggressiveNSECCacheNSEC3Test(AggressiveNSECCacheBase): _confdir = 'AggressiveNSECCacheNSEC3' __test__ = True diff --git a/regression-tests.recursor-dnssec/test_AnyBind.py b/regression-tests.recursor-dnssec/test_AnyBind.py index f1e9ab6b07..1dcae1f376 100644 --- a/regression-tests.recursor-dnssec/test_AnyBind.py +++ b/regression-tests.recursor-dnssec/test_AnyBind.py @@ -3,7 +3,7 @@ import os import socket from recursortests import RecursorTest -class testAnyBind(RecursorTest): +class AnyBindTest(RecursorTest): _confdir = 'AnyBind' _config_template = """dnssec=validate @@ -18,7 +18,7 @@ auth-zones=authzone.example=configs/%s/authzone.zone""" % _confdir @ 3600 IN SOA {soa} @ 3600 IN A 192.0.2.88 """.format(soa=cls._SOA)) - super(testAnyBind, cls).generateRecursorConfig(confdir) + super(AnyBindTest, cls).generateRecursorConfig(confdir) @classmethod def setUpSockets(cls): diff --git a/regression-tests.recursor-dnssec/test_Carbon.py b/regression-tests.recursor-dnssec/test_Carbon.py index f9ed9450cd..71d0365c33 100644 --- a/regression-tests.recursor-dnssec/test_Carbon.py +++ b/regression-tests.recursor-dnssec/test_Carbon.py @@ -8,7 +8,7 @@ from queue import Queue from recursortests import RecursorTest -class TestCarbon(RecursorTest): +class CarbonTest(RecursorTest): _confdir = 'Carbon' _carbonNamespace = 'NS' _carbonInstance = 'Instance' diff --git a/regression-tests.recursor-dnssec/test_DNS64.py b/regression-tests.recursor-dnssec/test_DNS64.py index 3b1e671ff9..c6b70d5c00 100644 --- a/regression-tests.recursor-dnssec/test_DNS64.py +++ b/regression-tests.recursor-dnssec/test_DNS64.py @@ -3,7 +3,7 @@ import os from recursortests import RecursorTest -class DNS64RecursorTest(RecursorTest): +class DNS64Test(RecursorTest): _confdir = 'DNS64' _config_template = """ @@ -54,7 +54,7 @@ formerr 3600 IN A 192.0.2.43 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2 IN PTR aaaa.example.dns64. """.format(soa=cls._SOA)) - super(DNS64RecursorTest, cls).generateRecursorConfig(confdir) + super(DNS64Test, cls).generateRecursorConfig(confdir) # this type (A) exists for this name def testExistingA(self): diff --git a/regression-tests.recursor-dnssec/test_EDNSBufferSize.py b/regression-tests.recursor-dnssec/test_EDNSBufferSize.py index 01ac82462f..e9b4ccb4aa 100644 --- a/regression-tests.recursor-dnssec/test_EDNSBufferSize.py +++ b/regression-tests.recursor-dnssec/test_EDNSBufferSize.py @@ -111,10 +111,11 @@ edns-outgoing-bufsize=%d self.assertEqual(message.edns, -1) -class EDNSBufferTest16801680(EDNSBufferTest): +class EDNSBuffer16801680Test(EDNSBufferTest): """ Runs test cases 1, 2, 5, 6, 7, 8 """ + _confdir = 'EDNSBuffer16801680' def testEdnsBufferTestCase01(self): query = self.getMessage('01', 4096) @@ -164,7 +165,7 @@ class EDNSBufferTest16801680(EDNSBufferTest): message = dns.message.from_wire(raw) self.checkEDNS(message, 512) -class EDNSBufferTest16801681(EDNSBufferTest): +class EDNSBuffer16801681Test(EDNSBufferTest): """ Runs test case 3 """ @@ -188,7 +189,7 @@ edns-outgoing-bufsize=%d self.checkEDNS(message, 512) -class EDNSBufferTest16801679(EDNSBufferTest): +class EDNSBuffer16801679Test(EDNSBufferTest): """ Runs test case 4 """ diff --git a/regression-tests.recursor-dnssec/test_Expired.py b/regression-tests.recursor-dnssec/test_Expired.py index 14c4948ecd..06be8af03a 100644 --- a/regression-tests.recursor-dnssec/test_Expired.py +++ b/regression-tests.recursor-dnssec/test_Expired.py @@ -8,7 +8,7 @@ import extendederrors from recursortests import RecursorTest -class testExpired(RecursorTest): +class ExpiredTest(RecursorTest): """This regression test starts the authoritative servers with a clock that is set 15 days into the past. Hence, the recursor must reject the signatures because they are expired. @@ -26,7 +26,7 @@ class testExpired(RecursorTest): self.assertRcodeEqual(res, dns.rcode.SERVFAIL) -class testExpiredWithEDE(RecursorTest): +class ExpiredWithEDETest(RecursorTest): """This regression test starts the authoritative servers with a clock that is set 15 days into the past. Hence, the recursor must reject the signatures because they are expired. diff --git a/regression-tests.recursor-dnssec/test_ExtendedErrors.py b/regression-tests.recursor-dnssec/test_ExtendedErrors.py index 73129c11f3..635c2c579c 100644 --- a/regression-tests.recursor-dnssec/test_ExtendedErrors.py +++ b/regression-tests.recursor-dnssec/test_ExtendedErrors.py @@ -5,7 +5,7 @@ import pytest from recursortests import RecursorTest -class ExtendedErrorsRecursorTest(RecursorTest): +class ExtendedErrorsTest(RecursorTest): _confdir = 'ExtendedErrors' _config_template = """ @@ -81,7 +81,7 @@ extended-resolution-errors=yes *.rpz.extended.zone.rpz. 60 IN CNAME . """.format(soa=cls._SOA)) - super(ExtendedErrorsRecursorTest, cls).generateRecursorConfig(confdir) + super(ExtendedErrorsTest, cls).generateRecursorConfig(confdir) def testNotIncepted(self): qname = 'signotincepted.bad-dnssec.wb.sidnlabs.nl.' @@ -206,9 +206,9 @@ extended-resolution-errors=yes self.assertEqual(res.options[0].otype, 15) self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(10, b'Extra text from Lua!')) -class NoExtendedErrorsRecursorTest(RecursorTest): +class NoExtendedErrorsTest(RecursorTest): - _confdir = 'ExtendedErrorsDisabled' + _confdir = 'NoExtendedErrors' _config_template = """ dnssec=validate extended-resolution-errors=no @@ -234,7 +234,7 @@ extended-resolution-errors=no @classmethod def generateRecursorConfig(cls, confdir): - super(NoExtendedErrorsRecursorTest, cls).generateRecursorConfig(confdir) + super(NoExtendedErrorsTest, cls).generateRecursorConfig(confdir) def testNotIncepted(self): qname = 'signotincepted.bad-dnssec.wb.sidnlabs.nl.' diff --git a/regression-tests.recursor-dnssec/test_Interop.py b/regression-tests.recursor-dnssec/test_Interop.py index 4b61759d71..772f72ec60 100644 --- a/regression-tests.recursor-dnssec/test_Interop.py +++ b/regression-tests.recursor-dnssec/test_Interop.py @@ -7,7 +7,7 @@ from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor import threading -class testInterop(RecursorTest): +class InteropTest(RecursorTest): _confdir = 'Interop' _config_template = """dnssec=validate @@ -151,7 +151,7 @@ forward-zones+=undelegated.insecure.example=%s.12 cls._UDPResponder.setDaemon(True) cls._UDPResponder.start() -class testInteropProcess(RecursorTest): +class InteropProcessTest(RecursorTest): _confdir = 'InteropProcess' _config_template = """dnssec=process diff --git a/regression-tests.recursor-dnssec/test_KeepOpenTCP.py b/regression-tests.recursor-dnssec/test_KeepOpenTCP.py index 571d074662..7c8630e142 100644 --- a/regression-tests.recursor-dnssec/test_KeepOpenTCP.py +++ b/regression-tests.recursor-dnssec/test_KeepOpenTCP.py @@ -5,7 +5,7 @@ import struct from recursortests import RecursorTest -class testKeepOpenTCP(RecursorTest): +class KeepOpenTCPTest(RecursorTest): _confdir = 'KeepOpenTCP' _config_template = """dnssec=validate @@ -21,7 +21,7 @@ auth-zones=authzone.example=configs/%s/authzone.zone""" % _confdir @ 3600 IN SOA {soa} @ 3600 IN A 192.0.2.88 """.format(soa=cls._SOA)) - super(testKeepOpenTCP, cls).generateRecursorConfig(confdir) + super(KeepOpenTCPTest, cls).generateRecursorConfig(confdir) def sendTCPQueryKeepOpen(cls, sock, query, timeout=2.0): try: diff --git a/regression-tests.recursor-dnssec/test_LockedCache.py b/regression-tests.recursor-dnssec/test_LockedCache.py index 9a58d97752..c53e31238d 100644 --- a/regression-tests.recursor-dnssec/test_LockedCache.py +++ b/regression-tests.recursor-dnssec/test_LockedCache.py @@ -5,7 +5,7 @@ import time from recursortests import RecursorTest -class testLockedCache(RecursorTest): +class LockedCacheTest(RecursorTest): """ Test that a locked cached entry is *not* updated by the same additional encountered in a second query """ @@ -55,7 +55,7 @@ class testLockedCache(RecursorTest): ttl2 = self.getCacheTTL() self.assertGreater(ttl1, ttl2) -class testNotLockedCache(RecursorTest): +class NotLockedCacheTest(RecursorTest): """ Test that a not locked cached entry *is* updated by the same additional encountered in a second query """ diff --git a/regression-tests.recursor-dnssec/test_NTA.py b/regression-tests.recursor-dnssec/test_NTA.py index f2268d7f32..44b1672d85 100644 --- a/regression-tests.recursor-dnssec/test_NTA.py +++ b/regression-tests.recursor-dnssec/test_NTA.py @@ -1,7 +1,7 @@ import dns from recursortests import RecursorTest -class testNTA(RecursorTest): +class NTATest(RecursorTest): _confdir = 'NTA' _config_template = """dnssec=validate""" diff --git a/regression-tests.recursor-dnssec/test_NamedForward.py b/regression-tests.recursor-dnssec/test_NamedForward.py index 018990b71b..14e5baff90 100644 --- a/regression-tests.recursor-dnssec/test_NamedForward.py +++ b/regression-tests.recursor-dnssec/test_NamedForward.py @@ -5,7 +5,7 @@ import subprocess import time from recursortests import RecursorTest -class testNamedForward(RecursorTest): +class NamedForwardTest(RecursorTest): """ This is forwarding test using a name as target """ @@ -41,7 +41,7 @@ system-resolver-ttl=10 self.assertMatchingRRSIGInAnswer(res, expected) @unittest.skipUnless('ENABLE_SUDO_TESTS' in os.environ, "sudo is not available") -class testNamedForwardWithChange(RecursorTest): +class NamedForwardWithChangeTest(RecursorTest): """ This is forwarding test using a name as target and a changing resolve """ diff --git a/regression-tests.recursor-dnssec/test_NoDS.py b/regression-tests.recursor-dnssec/test_NoDS.py index 5e9e9131e1..630b717bc6 100644 --- a/regression-tests.recursor-dnssec/test_NoDS.py +++ b/regression-tests.recursor-dnssec/test_NoDS.py @@ -2,7 +2,7 @@ import dns from recursortests import RecursorTest -class testNoDS(RecursorTest): +class NoDSTest(RecursorTest): _confdir = 'NoDS' _config_template = """dnssec=validate""" diff --git a/regression-tests.recursor-dnssec/test_NoDSYAML.py b/regression-tests.recursor-dnssec/test_NoDSYAML.py index 17b36e5ec6..b944d8cfe6 100644 --- a/regression-tests.recursor-dnssec/test_NoDSYAML.py +++ b/regression-tests.recursor-dnssec/test_NoDSYAML.py @@ -1,7 +1,7 @@ import dns from recursortests import RecursorTest -class testNoDSYAML(RecursorTest): +class NoDSYAMLTest(RecursorTest): _confdir = 'NoDSYAML' _config_template = """ @@ -11,7 +11,7 @@ dnssec: """ @classmethod def generateRecursorConfig(cls, confdir): - super(testNoDSYAML, cls).generateRecursorYamlConfig(confdir, False) + super(NoDSYAMLTest, cls).generateRecursorYamlConfig(confdir, False) def testNoDSInsecure(self): """#4430 When the root DS is removed, the result must be Insecure""" diff --git a/regression-tests.recursor-dnssec/test_NotYetValid.py b/regression-tests.recursor-dnssec/test_NotYetValid.py index b2164cf340..a6b41b1a47 100644 --- a/regression-tests.recursor-dnssec/test_NotYetValid.py +++ b/regression-tests.recursor-dnssec/test_NotYetValid.py @@ -7,7 +7,7 @@ import dns from recursortests import RecursorTest -class testNotYetValid(RecursorTest): +class NotYetValidTest(RecursorTest): """This regression test starts the authoritative servers with a clock that is set 15 days into the future. Hence, the recursor must reject the signatures because they are not yet valid. diff --git a/regression-tests.recursor-dnssec/test_Notify.py b/regression-tests.recursor-dnssec/test_Notify.py index 622ad37ec6..7b65e1dda4 100644 --- a/regression-tests.recursor-dnssec/test_Notify.py +++ b/regression-tests.recursor-dnssec/test_Notify.py @@ -7,7 +7,7 @@ import subprocess from recursortests import RecursorTest -class NotifyRecursorTest(RecursorTest): +class NotifyTest(RecursorTest): _auth_zones = { '8': {'threads': 1, @@ -46,7 +46,7 @@ d 3600 IN A 192.0.2.42 e 3600 IN A 192.0.2.42 f 3600 IN CNAME f ; CNAME loop: dirty trick to get a ServFail in an authzone """.format(soa=cls._SOA)) - super(NotifyRecursorTest, cls).generateRecursorConfig(confdir) + super(NotifyTest, cls).generateRecursorConfig(confdir) def checkRecordCacheMetrics(self, expectedHits, expectedMisses): headers = {'x-api-key': self._apiKey} diff --git a/regression-tests.recursor-dnssec/test_OOOTCP.py b/regression-tests.recursor-dnssec/test_OOOTCP.py index 9c18017011..24d225e503 100644 --- a/regression-tests.recursor-dnssec/test_OOOTCP.py +++ b/regression-tests.recursor-dnssec/test_OOOTCP.py @@ -3,7 +3,7 @@ import os import time from recursortests import RecursorTest -class testOOOTCP(RecursorTest): +class OOOTCPTest(RecursorTest): _confdir = 'OOOTCP' _config_template = """dnssec=validate @@ -11,7 +11,7 @@ class testOOOTCP(RecursorTest): @classmethod def generateRecursorConfig(cls, confdir): - super(testOOOTCP, cls).generateRecursorConfig(confdir) + super(OOOTCPTest, cls).generateRecursorConfig(confdir) def testOOOVeryBasic(self): expected = {} diff --git a/regression-tests.recursor-dnssec/test_PacketCache.py b/regression-tests.recursor-dnssec/test_PacketCache.py index ba8c102ddd..61472d014b 100644 --- a/regression-tests.recursor-dnssec/test_PacketCache.py +++ b/regression-tests.recursor-dnssec/test_PacketCache.py @@ -7,7 +7,7 @@ import subprocess from recursortests import RecursorTest -class PacketCacheRecursorTest(RecursorTest): +class PacketCacheTest(RecursorTest): _auth_zones = { '8': {'threads': 1, @@ -44,7 +44,7 @@ d 3600 IN A 192.0.2.42 e 3600 IN A 192.0.2.42 f 3600 IN CNAME f ; CNAME loop: dirty trick to get a ServFail in an authzone """.format(soa=cls._SOA)) - super(PacketCacheRecursorTest, cls).generateRecursorConfig(confdir) + super(PacketCacheTest, cls).generateRecursorConfig(confdir) def checkPacketCacheMetrics(self, expectedHits, expectedMisses): self.waitForTCPSocket("127.0.0.1", self._wsPort) diff --git a/regression-tests.recursor-dnssec/test_Prometheus.py b/regression-tests.recursor-dnssec/test_Prometheus.py index dc82f80fd7..c734b27f63 100644 --- a/regression-tests.recursor-dnssec/test_Prometheus.py +++ b/regression-tests.recursor-dnssec/test_Prometheus.py @@ -58,7 +58,7 @@ class RecPrometheusTest(RecursorTest): raise AssertionError('%s returned an unexpected output. Faulty line is "%s", complete content is "%s"' % (testcmd, line, output)) class BasicPrometheusTest(RecPrometheusTest): - _confdir = 'Prometheus' + _confdir = 'BasicPrometheus' _wsPort = 8042 _wsTimeout = 2 _wsPassword = 'secretpassword' diff --git a/regression-tests.recursor-dnssec/test_ProxyByTable.py b/regression-tests.recursor-dnssec/test_ProxyByTable.py index b804001fb2..7f631d4dc5 100644 --- a/regression-tests.recursor-dnssec/test_ProxyByTable.py +++ b/regression-tests.recursor-dnssec/test_ProxyByTable.py @@ -2,7 +2,7 @@ import dns import os from recursortests import RecursorTest -class testProxyByTable(RecursorTest): +class ProxyByTableTest(RecursorTest): """ This test makes sure that we correctly use the proxy-mapped address during the ACL check """ @@ -25,7 +25,7 @@ class testProxyByTable(RecursorTest): @ 3600 IN SOA {soa} @ 3600 IN A 192.0.2.88 """.format(soa=cls._SOA)) - super(testProxyByTable, cls).generateRecursorConfig(confdir) + super(ProxyByTableTest, cls).generateRecursorConfig(confdir) def testA(self): diff --git a/regression-tests.recursor-dnssec/test_ProxyProtocol.py b/regression-tests.recursor-dnssec/test_ProxyProtocol.py index 78c88d025f..43cd775123 100644 --- a/regression-tests.recursor-dnssec/test_ProxyProtocol.py +++ b/regression-tests.recursor-dnssec/test_ProxyProtocol.py @@ -14,7 +14,7 @@ except NameError: from recursortests import RecursorTest from proxyprotocol import ProxyProtocol -class ProxyProtocolRecursorTest(RecursorTest): +class ProxyProtocolTest(RecursorTest): @classmethod def setUpClass(cls): @@ -33,8 +33,8 @@ class ProxyProtocolRecursorTest(RecursorTest): def tearDownClass(cls): cls.tearDownRecursor() -class ProxyProtocolAllowedRecursorTest(ProxyProtocolRecursorTest): - _confdir = 'ProxyProtocol' +class ProxyProtocolAllowedTest(ProxyProtocolTest): + _confdir = 'ProxyProtocolAllowed' _wsPort = 8042 _wsTimeout = 2 _wsPassword = 'secretpassword' @@ -133,7 +133,7 @@ class ProxyProtocolAllowedRecursorTest(ProxyProtocolRecursorTest): dq:addAnswer(pdns.A, '192.0.2.1', 60) return true end - """ % (ProxyProtocolRecursorTest._recursorPort, ProxyProtocolRecursorTest._recursorPort) + """ % (ProxyProtocolTest._recursorPort, ProxyProtocolTest._recursorPort) _config_template = """ proxy-protocol-from=127.0.0.1 @@ -486,9 +486,9 @@ api-key=%s self.assertEqual(count, 5) sock.close() -class ProxyProtocolAllowedFFIRecursorTest(ProxyProtocolAllowedRecursorTest): - # same tests than ProxyProtocolAllowedRecursorTest but with the Lua FFI interface instead of the regular one - _confdir = 'ProxyProtocolFFI' +class ProxyProtocolAllowedFFITest(ProxyProtocolAllowedTest): + # same tests than ProxyProtocolAllowedTest but with the Lua FFI interface instead of the regular one + _confdir = 'ProxyProtocolAllowedFFI' _lua_dns_script_file = """ local ffi = require("ffi") @@ -634,9 +634,9 @@ class ProxyProtocolAllowedFFIRecursorTest(ProxyProtocolAllowedRecursorTest): dq:addAnswer(pdns.A, '192.0.2.1', 60) return true end - """ % (ProxyProtocolAllowedRecursorTest._recursorPort) + """ % (ProxyProtocolAllowedTest._recursorPort) -class ProxyProtocolNotAllowedRecursorTest(ProxyProtocolRecursorTest): +class ProxyProtocolNotAllowedTest(ProxyProtocolTest): _confdir = 'ProxyProtocolNotAllowed' _lua_dns_script_file = """ @@ -672,7 +672,7 @@ class ProxyProtocolNotAllowedRecursorTest(ProxyProtocolRecursorTest): res = sender(query, False, '127.0.0.42', '255.255.255.255', 0, 65535, [ [0, b'foo' ], [ 255, b'bar'] ]) self.assertEqual(res, None) -class ProxyProtocolExceptionRecursorTest(ProxyProtocolRecursorTest): +class ProxyProtocolExceptionTest(ProxyProtocolTest): _confdir = 'ProxyProtocolException' _lua_dns_script_file = """ @@ -686,7 +686,7 @@ class ProxyProtocolExceptionRecursorTest(ProxyProtocolRecursorTest): proxy-protocol-from=127.0.0.1/32 proxy-protocol-exceptions=127.0.0.1:%d allow-from=127.0.0.0/24, ::1/128 -""" % (ProxyProtocolRecursorTest._recursorPort) +""" % (ProxyProtocolTest._recursorPort) def testNoHeaderProxyProtocol(self): qname = 'no-header.proxy-protocol-not-allowed.recursor-tests.powerdns.com.' diff --git a/regression-tests.recursor-dnssec/test_RoutingTag.py b/regression-tests.recursor-dnssec/test_RoutingTag.py index 6d54618ae6..a1cec5d0ca 100644 --- a/regression-tests.recursor-dnssec/test_RoutingTag.py +++ b/regression-tests.recursor-dnssec/test_RoutingTag.py @@ -105,7 +105,7 @@ ecs-add-for=0.0.0.0/0 cls.tearDownRecursor() os.unlink('tagfile') -class testRoutingTag(RoutingTagTest): +class RoutingTagTest(RoutingTagTest): _confdir = 'RoutingTag' _config_template = """ @@ -179,7 +179,7 @@ end print(e.output) raise -class testRoutingTagFFI(RoutingTagTest): +class RoutingTagFFITest(RoutingTagTest): _confdir = 'RoutingTagFFI' _config_template = """ diff --git a/regression-tests.recursor-dnssec/test_SNMP.py b/regression-tests.recursor-dnssec/test_SNMP.py index 27b31ffbe3..a386519554 100644 --- a/regression-tests.recursor-dnssec/test_SNMP.py +++ b/regression-tests.recursor-dnssec/test_SNMP.py @@ -4,7 +4,7 @@ from pysnmp.hlapi import * from recursortests import RecursorTest -class TestSNMP(RecursorTest): +class SNMPTest(RecursorTest): _snmpTimeout = 2.0 _snmpServer = '127.0.0.1' diff --git a/regression-tests.recursor-dnssec/test_ServerNames.py b/regression-tests.recursor-dnssec/test_ServerNames.py index 79dfd0060e..1611f625d7 100644 --- a/regression-tests.recursor-dnssec/test_ServerNames.py +++ b/regression-tests.recursor-dnssec/test_ServerNames.py @@ -2,7 +2,7 @@ import dns import os from recursortests import RecursorTest -class testServerNames(RecursorTest): +class ServerNamesTest(RecursorTest): """ This tests all kinds naming things """ diff --git a/regression-tests.recursor-dnssec/test_Simple.py b/regression-tests.recursor-dnssec/test_Simple.py index e6c4e97455..7a247bce40 100644 --- a/regression-tests.recursor-dnssec/test_Simple.py +++ b/regression-tests.recursor-dnssec/test_Simple.py @@ -2,7 +2,7 @@ import dns import os from recursortests import RecursorTest -class testSimple(RecursorTest): +class SimpleTest(RecursorTest): _confdir = 'Simple' _config_template = """dnssec=validate @@ -16,7 +16,7 @@ auth-zones=authzone.example=configs/%s/authzone.zone""" % _confdir @ 3600 IN SOA {soa} @ 3600 IN A 192.0.2.88 """.format(soa=cls._SOA)) - super(testSimple, cls).generateRecursorConfig(confdir) + super(SimpleTest, cls).generateRecursorConfig(confdir) def testSOAs(self): for zone in ['.', 'example.', 'secure.example.']: diff --git a/regression-tests.recursor-dnssec/test_SimpleDoT.py b/regression-tests.recursor-dnssec/test_SimpleDoT.py index fcc915ab53..0c22b87f34 100644 --- a/regression-tests.recursor-dnssec/test_SimpleDoT.py +++ b/regression-tests.recursor-dnssec/test_SimpleDoT.py @@ -3,7 +3,7 @@ import os import subprocess from recursortests import RecursorTest -class testSimpleDoT(RecursorTest): +class SimpleDoTTest(RecursorTest): """ This tests DoT to auth server in a very basic way and is dependent on powerdns.com nameservers having DoT enabled. """ diff --git a/regression-tests.recursor-dnssec/test_SimpleForwardOverDoT.py b/regression-tests.recursor-dnssec/test_SimpleForwardOverDoT.py index d839d43084..7365b27f76 100644 --- a/regression-tests.recursor-dnssec/test_SimpleForwardOverDoT.py +++ b/regression-tests.recursor-dnssec/test_SimpleForwardOverDoT.py @@ -3,7 +3,7 @@ import os import subprocess from recursortests import RecursorTest -class testSimpleForwardOverDoT(RecursorTest): +class SimpleForwardOverDoTTest(RecursorTest): """ This is forwarding to a DoT server in a very basic way and is dependent on Quad9 working """ diff --git a/regression-tests.recursor-dnssec/test_SimpleTCP.py b/regression-tests.recursor-dnssec/test_SimpleTCP.py index b70900f759..4fb7733c41 100644 --- a/regression-tests.recursor-dnssec/test_SimpleTCP.py +++ b/regression-tests.recursor-dnssec/test_SimpleTCP.py @@ -2,7 +2,7 @@ import dns import os from recursortests import RecursorTest -class testSimpleTCP(RecursorTest): +class SimpleTCPTest(RecursorTest): _confdir = 'SimpleTCP' _config_template = """dnssec=validate @@ -16,7 +16,7 @@ auth-zones=authzone.example=configs/%s/authzone.zone""" % _confdir @ 3600 IN SOA {soa} @ 3600 IN A 192.0.2.88 """.format(soa=cls._SOA)) - super(testSimpleTCP, cls).generateRecursorConfig(confdir) + super(SimpleTCPTest, cls).generateRecursorConfig(confdir) def testSOAs(self): for zone in ['.', 'example.', 'secure.example.']: diff --git a/regression-tests.recursor-dnssec/test_SimpleYAML.py b/regression-tests.recursor-dnssec/test_SimpleYAML.py index e4713401f4..9d742162f4 100644 --- a/regression-tests.recursor-dnssec/test_SimpleYAML.py +++ b/regression-tests.recursor-dnssec/test_SimpleYAML.py @@ -2,7 +2,7 @@ import dns import os from recursortests import RecursorTest -class testSimpleYAML(RecursorTest): +class SimpleYAMLTest(RecursorTest): _confdir = 'SimpleYAML' _config_template = """ @@ -21,7 +21,7 @@ dnssec: @ 3600 IN SOA {soa} @ 3600 IN A 192.0.2.88 """.format(soa=cls._SOA)) - super(testSimpleYAML, cls).generateRecursorYamlConfig(confdir) + super(SimpleYAMLTest, cls).generateRecursorYamlConfig(confdir) def testSOAs(self): for zone in ['.', 'example.', 'secure.example.']: diff --git a/regression-tests.recursor-dnssec/test_Sortlist.py b/regression-tests.recursor-dnssec/test_Sortlist.py index 7665602bd0..fdf8e29645 100644 --- a/regression-tests.recursor-dnssec/test_Sortlist.py +++ b/regression-tests.recursor-dnssec/test_Sortlist.py @@ -2,7 +2,7 @@ import dns from recursortests import RecursorTest -class testSortlist(RecursorTest): +class SortlistTest(RecursorTest): _confdir = 'Sortlist' _config_template = """dnssec=off""" @@ -38,4 +38,4 @@ class testSortlist(RecursorTest): self.assertEqual(indexCNAME, 0) self.assertGreater(indexMX, 0) - self.assertEqual(recordsA, ['17.238.240.5', '17.38.42.80', '192.168.0.1']) \ No newline at end of file + self.assertEqual(recordsA, ['17.238.240.5', '17.38.42.80', '192.168.0.1']) diff --git a/regression-tests.recursor-dnssec/test_TraceFail.py b/regression-tests.recursor-dnssec/test_TraceFail.py index 52e8c29781..6f7e7b0587 100644 --- a/regression-tests.recursor-dnssec/test_TraceFail.py +++ b/regression-tests.recursor-dnssec/test_TraceFail.py @@ -4,7 +4,7 @@ import time import subprocess from recursortests import RecursorTest -class testTraceFail(RecursorTest): +class TraceFailTest(RecursorTest): _confdir = 'TraceFail' _config_template = """ diff --git a/regression-tests.recursor-dnssec/test_ZTC.py b/regression-tests.recursor-dnssec/test_ZTC.py index f880692364..c8b1667cd2 100644 --- a/regression-tests.recursor-dnssec/test_ZTC.py +++ b/regression-tests.recursor-dnssec/test_ZTC.py @@ -5,7 +5,7 @@ import subprocess from recursortests import RecursorTest -class testZTC(RecursorTest): +class ZTCTest(RecursorTest): _confdir = 'ZTC' _config_template = """ diff --git a/regression-tests.recursor-dnssec/test_basicNSEC.py b/regression-tests.recursor-dnssec/test_basicNSEC.py index 9987776d8b..09227caf8e 100644 --- a/regression-tests.recursor-dnssec/test_basicNSEC.py +++ b/regression-tests.recursor-dnssec/test_basicNSEC.py @@ -1,6 +1,6 @@ from basicDNSSEC import BasicDNSSEC import unittest -class basicNSEC(BasicDNSSEC): +class basicNSECTest(BasicDNSSEC): __test__ = True _confdir = 'basicNSEC' diff --git a/regression-tests.recursor-dnssec/test_basicNSEC3.py b/regression-tests.recursor-dnssec/test_basicNSEC3.py index 34ef04f933..d82d7cd930 100644 --- a/regression-tests.recursor-dnssec/test_basicNSEC3.py +++ b/regression-tests.recursor-dnssec/test_basicNSEC3.py @@ -3,7 +3,7 @@ from basicDNSSEC import BasicDNSSEC import os import subprocess -class basicNSEC3(BasicDNSSEC): +class basicNSEC3Test(BasicDNSSEC): __test__ = True _confdir = 'basicNSEC3'