From 7f8f08937f935cbf136e993cdf1a7d84d5af9629 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 3 Apr 2023 09:20:12 +0200 Subject: [PATCH] Regression tests should use new EDE --- .../test_AggressiveNSECCache.py | 18 +++++++++--------- .../test_RootNXTrust.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py b/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py index 35588e33c6..2ff833efcd 100644 --- a/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py +++ b/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py @@ -93,7 +93,7 @@ class AggressiveNSECCacheBase(RecursorTest): self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized from aggressive NSEC cache (RFC8198)')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) class AggressiveNSECCacheNSEC(AggressiveNSECCacheBase): _confdir = 'AggressiveNSECCacheNSEC' @@ -131,7 +131,7 @@ class AggressiveNSECCacheNSEC(AggressiveNSECCacheBase): self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized from aggressive NSEC cache (RFC8198)')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) def testWildcard(self): self.wipe() @@ -158,7 +158,7 @@ class AggressiveNSECCacheNSEC(AggressiveNSECCacheBase): self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized from aggressive NSEC cache (RFC8198)')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) # now we ask for a type that does not exist at the wildcard hits = self.getMetric('aggressive-nsec-cache-nsec-hits') @@ -173,7 +173,7 @@ class AggressiveNSECCacheNSEC(AggressiveNSECCacheBase): self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized from aggressive NSEC cache (RFC8198)')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) # we can also ask a different type, for a different name that is covered # by the NSEC and matches the wildcard (but the type does not exist) @@ -189,7 +189,7 @@ class AggressiveNSECCacheNSEC(AggressiveNSECCacheBase): self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized from aggressive NSEC cache (RFC8198)')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) def test_Bogus(self): self.wipe() @@ -303,7 +303,7 @@ class AggressiveNSECCacheNSEC3(AggressiveNSECCacheBase): self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized from aggressive NSEC cache (RFC8198)')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) def testWildcard(self): self.wipe() @@ -336,7 +336,7 @@ class AggressiveNSECCacheNSEC3(AggressiveNSECCacheBase): self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized from aggressive NSEC cache (RFC8198)')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) # now we ask for a type that does not exist at the wildcard nbQueries = self.getMetric('all-outqueries') @@ -349,7 +349,7 @@ class AggressiveNSECCacheNSEC3(AggressiveNSECCacheBase): self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized from aggressive NSEC cache (RFC8198)')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) # we can also ask a different type, for a different name that is covered # by the NSEC3s and matches the wildcard (but the type does not exist) @@ -363,7 +363,7 @@ class AggressiveNSECCacheNSEC3(AggressiveNSECCacheBase): self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized from aggressive NSEC cache (RFC8198)')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized from aggressive NSEC cache (RFC8198)')) def test_OptOut(self): self.wipe() diff --git a/regression-tests.recursor-dnssec/test_RootNXTrust.py b/regression-tests.recursor-dnssec/test_RootNXTrust.py index 21254b4db2..cb1133641b 100644 --- a/regression-tests.recursor-dnssec/test_RootNXTrust.py +++ b/regression-tests.recursor-dnssec/test_RootNXTrust.py @@ -138,4 +138,4 @@ extended-resolution-errors self.assertEqual(res.edns, 0) self.assertEqual(len(res.options), 1) self.assertEqual(res.options[0].otype, 15) - self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(0, b'Result synthesized by root-nx-trust')) + self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(29, b'Result synthesized by root-nx-trust')) -- 2.47.2