From 3f9f84c6ec04059b33f6b23999c35e1591290902 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 27 May 2019 14:40:24 +0200 Subject: [PATCH] Add some notes explaining why some validations are not relevant in the dnstap case. --- regression-tests.recursor-dnssec/test_RecDnstap.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/regression-tests.recursor-dnssec/test_RecDnstap.py b/regression-tests.recursor-dnssec/test_RecDnstap.py index 0669fbc7d..c94c1b5c2 100644 --- a/regression-tests.recursor-dnssec/test_RecDnstap.py +++ b/regression-tests.recursor-dnssec/test_RecDnstap.py @@ -43,6 +43,9 @@ def checkDnstapBase(testinstance, dnstap, protocol, initiator): testinstance.assertEqual(dnstap.message.socket_protocol, protocol) testinstance.assertTrue(dnstap.message.HasField('socket_family')) testinstance.assertEquals(dnstap.message.socket_family, dnstap_pb2.INET) + # + # We cannot check the query address and port since we only log outgoing queries via dnstap + # #testinstance.assertTrue(dnstap.message.HasField('query_address')) #testinstance.assertEquals(socket.inet_ntop(socket.AF_INET, dnstap.message.query_address), initiator) testinstance.assertTrue(dnstap.message.HasField('response_address')) @@ -59,6 +62,10 @@ def checkDnstapQuery(testinstance, dnstap, protocol, query, initiator='127.0.0.1 testinstance.assertTrue(dnstap.message.HasField('query_time_nsec')) testinstance.assertTrue(dnstap.message.HasField('query_message')) + # + # We cannot compare the incoming query with the outgoing one + # The IDs and some other fields will be different + # wire_message = dns.message.from_wire(dnstap.message.query_message) #testinstance.assertEqual(wire_message, query) -- 2.40.0