Skip to content

Commit

Permalink
Merge pull request #13833 from omoerbeek/backport-13813-to-rec-5.0.x
Browse files Browse the repository at this point in the history
rec: Backport 13813 to rec.5.0.x: dnspython's API changed wrt NSID, apply (version dependent) fix in regression test
  • Loading branch information
omoerbeek committed Feb 26, 2024
2 parents a3c86ec + 720fbea commit a6fde8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions regression-tests.recursor-dnssec/test_ExtendedErrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def generateRecursorConfig(cls, confdir):

super(ExtendedErrorsRecursorTest, cls).generateRecursorConfig(confdir)

@pytest.mark.skip(reason="sidnlabs no longer serves thiss until further notice")
@pytest.mark.skip(reason="sidnlabs no longer serves this until further notice")
def testNotIncepted(self):
qname = 'signotincepted.bad-dnssec.wb.sidnlabs.nl.'
query = dns.message.make_query(qname, 'A', want_dnssec=True)
Expand All @@ -97,7 +97,7 @@ def testNotIncepted(self):
self.assertEqual(res.options[0].otype, 15)
self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(8, b''))

@pytest.mark.skip(reason="sidnlabs no longer serves thiss until further notice")
@pytest.mark.skip(reason="sidnlabs no longer serves this until further notice")
def testExpired(self):
qname = 'sigexpired.bad-dnssec.wb.sidnlabs.nl.'
query = dns.message.make_query(qname, 'A', want_dnssec=True)
Expand All @@ -124,7 +124,7 @@ def testAllExpired(self):
self.assertEqual(res.options[0].otype, 15)
self.assertEqual(res.options[0], extendederrors.ExtendedErrorOption(6, b''))

@pytest.mark.skip(reason="sidnlabs no longer serves thiss until further notice")
@pytest.mark.skip(reason="sidnlabs no longer serves this until further notice")
def testBogus(self):
qname = 'bogussig.ok.bad-dnssec.wb.sidnlabs.nl.'
query = dns.message.make_query(qname, 'A', want_dnssec=True)
Expand Down Expand Up @@ -239,7 +239,7 @@ def tearDownClass(cls):
def generateRecursorConfig(cls, confdir):
super(NoExtendedErrorsRecursorTest, cls).generateRecursorConfig(confdir)

@pytest.mark.skip(reason="sidnlabs no longer serves thiss until further notice")
@pytest.mark.skip(reason="sidnlabs no longer serves this until further notice")
def testNotIncepted(self):
qname = 'signotincepted.bad-dnssec.wb.sidnlabs.nl.'
query = dns.message.make_query(qname, 'A', want_dnssec=True)
Expand Down
10 changes: 8 additions & 2 deletions regression-tests.recursor-dnssec/test_ServerNames.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ def testNSIDUDP(self):
response = self.sendUDPQuery(query)

self.assertEqual(len(response.options), 1)
self.assertEqual(response.options[0].data, self._servername.encode('ascii'))
if dns.version.MAJOR < 2 or (dns.version.MAJOR == 2 and dns.version.MINOR < 6):
self.assertEqual(response.options[0].data, self._servername.encode('ascii'))
else:
self.assertEqual(response.options[0].to_text(), 'NSID ' + self._servername)

def testNSIDTCP(self):
"""
Expand All @@ -119,4 +122,7 @@ def testNSIDTCP(self):
response = self.sendTCPQuery(query)

self.assertEqual(len(response.options), 1)
self.assertEqual(response.options[0].data, self._servername.encode('ascii'))
if dns.version.MAJOR < 2 or (dns.version.MAJOR == 2 and dns.version.MINOR < 6):
self.assertEqual(response.options[0].data, self._servername.encode('ascii'))
else:
self.assertEqual(response.options[0].to_text(), 'NSID ' + self._servername)

0 comments on commit a6fde8d

Please sign in to comment.