]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
enhance test so it also covers non-truncation over TCP/IP for dnsdist dynamic truncation
authorbert hubert <bert.hubert@powerdns.com>
Thu, 24 Aug 2017 14:50:06 +0000 (16:50 +0200)
committerbert hubert <bert.hubert@powerdns.com>
Thu, 24 Aug 2017 14:50:06 +0000 (16:50 +0200)
regression-tests.dnsdist/test_DynBlocks.py

index b0aea87c6ece0ce6802e1b71849ca206aa354b79..430d87e9b77c6fb457872560192005401b9da602 100644 (file)
@@ -360,7 +360,7 @@ class TestDynBlockQPSActionTruncated(DNSDistTest):
                 # let's clear the response queue
                 self.clearToResponderQueue()
 
-        # we might be already blocked, but we should have been able to send
+        # we might be already truncated, but we should have been able to send
         # at least self._dynBlockQPS queries
         self.assertGreaterEqual(allowed, self._dynBlockQPS)
 
@@ -372,6 +372,12 @@ class TestDynBlockQPSActionTruncated(DNSDistTest):
         (_, receivedResponse) = self.sendUDPQuery(query, response=None, useQueue=False)
         self.assertEquals(receivedResponse, truncatedResponse)
 
+        # check over TCP, which should not be truncated
+        (receivedQuery, receivedResponse) = self.sendTCPQuery(query, response)
+
+        self.assertEquals(query, receivedQuery)
+        self.assertEquals(receivedResponse, response)
+
         # wait until we are not blocked anymore
         time.sleep(self._dynBlockDuration + self._dynBlockPeriod)