From: Otto Moerbeek Date: Thu, 20 Jul 2023 11:56:35 +0000 (+0200) Subject: rec: Don't check TTLs of records coming out of packet cache in regress tests X-Git-Tag: rec-5.0.0-alpha1~96^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F13059%2Fhead;p=thirdparty%2Fpdns.git rec: Don't check TTLs of records coming out of packet cache in regress tests That won't work on a slow system --- diff --git a/regression-tests.recursor-dnssec/test_Protobuf.py b/regression-tests.recursor-dnssec/test_Protobuf.py index 79d57e4561..347c918832 100644 --- a/regression-tests.recursor-dnssec/test_Protobuf.py +++ b/regression-tests.recursor-dnssec/test_Protobuf.py @@ -974,8 +974,8 @@ auth-zones=example=configs/%s/example.zone""" % _confdir self.checkProtobufResponse(msg, dnsmessage_pb2.PBDNSMessage.UDP, res) self.assertEqual(len(msg.response.rrs), 1) rr = msg.response.rrs[0] - # we have max-cache-ttl set to 15 - self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, name, 15) + # time may have passed, so do not check TTL + self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, name, 15, checkTTL=False) self.assertEqual(socket.inet_ntop(socket.AF_INET, rr.rdata), '192.0.2.84') tags = [ self._tag_from_gettag ] + self._tags self.checkProtobufTags(msg, tags) @@ -1028,8 +1028,8 @@ auth-zones=example=configs/%s/example.zone""" % _confdir self.checkProtobufResponse(msg, dnsmessage_pb2.PBDNSMessage.UDP, res) self.assertEqual(len(msg.response.rrs), 1) rr = msg.response.rrs[0] - # we have max-cache-ttl set to 15 - self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, name, 15) + # time may have passed, so do not check TTL + self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, name, 15, checkTTL=False) self.assertEqual(socket.inet_ntop(socket.AF_INET, rr.rdata), '192.0.2.84') self.checkNoRemainingMessage() self.assertEqual(len(msg.response.tags), 1)