From: Otto Moerbeek Date: Wed, 3 Jul 2019 13:48:40 +0000 (+0200) Subject: Merge branch 'master' into rec-outgoing-timeouts X-Git-Tag: dnsdist-1.4.0-rc1~70^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4710324a36b560261cf2a0b201943383f58d049d;p=pdns Merge branch 'master' into rec-outgoing-timeouts --- 4710324a36b560261cf2a0b201943383f58d049d diff --cc regression-tests.recursor-dnssec/test_Protobuf.py index 14497a53c,ba01456fa..5aa77ed7e --- a/regression-tests.recursor-dnssec/test_Protobuf.py +++ b/regression-tests.recursor-dnssec/test_Protobuf.py @@@ -218,17 -215,20 +218,25 @@@ class TestRecursorProtobuf(RecursorTest self.assertTrue(msg.question.HasField('qName')) self.assertEquals(msg.question.qName, qname) - def checkProtobufIncomingResponse(self, msg, protocol, response, initiator='127.0.0.1'): + def checkProtobufIncomingResponse(self, msg, protocol, response, initiator='127.0.0.1', length=None): self.assertEquals(msg.type, dnsmessage_pb2.PBDNSMessage.DNSIncomingResponseType) - self.checkOutgoingProtobufBase(msg, protocol, response, initiator) + self.checkOutgoingProtobufBase(msg, protocol, response, initiator, length=length) self.assertTrue(msg.HasField('response')) + self.assertTrue(msg.response.HasField('rcode')) self.assertTrue(msg.response.HasField('queryTimeSec')) + def checkProtobufIncomingNetworkErrorResponse(self, msg, protocol, response, initiator='127.0.0.1'): + self.checkProtobufIncomingResponse(msg, protocol, response, initiator, length=0) + self.assertEquals(msg.response.rcode, 65536) + + def checkProtobufIdentity(self, msg, requestorId, deviceId, deviceName): + self.assertTrue(msg.HasField('requestorId')) + self.assertTrue(msg.HasField('deviceId')) + self.assertTrue(msg.HasField('deviceName')) + self.assertEquals(msg.requestorId, requestorId) + self.assertEquals(msg.deviceId, deviceId) + self.assertEquals(msg.deviceName, deviceName) + @classmethod def setUpClass(cls):