setMaxTCPConnectionDuration(%s)
pc = newPacketCache(100, {maxTTL=86400, minTTL=1})
getPool(""):setCache(pc)
- addAction("largernumberofconnections.tcpka.tests.powerdns.com.", SkipCacheAction())
- addAction("refused.tcpka.tests.powerdns.com.", RCodeAction(dnsdist.REFUSED))
+ addAction("largernumberofconnections.tcpka.tests.powerdns.com.", SetSkipCacheAction())
+ addAction("refused.tcpka.tests.powerdns.com.", RCodeAction(DNSRCode.REFUSED))
addAction("dropped.tcpka.tests.powerdns.com.", DropAction())
addResponseAction("dropped-response.tcpka.tests.powerdns.com.", DropResponseAction())
-- create the pool named "nosuchpool"
"""
name = 'refused.tcpka.tests.powerdns.com.'
query = dns.message.make_query(name, 'A', 'IN')
+ query.flags &= ~dns.flags.RD
expectedResponse = dns.message.make_response(query)
expectedResponse.set_rcode(dns.rcode.REFUSED)
response = self.recvTCPResponseOverConnection(conn)
if response is None:
break
- self.assertEquals(expectedResponse, response)
+ self.assertEqual(expectedResponse, response)
count = count + 1
except:
pass
self.assertTrue(receivedQuery)
self.assertTrue(receivedResponse)
receivedQuery.id = query.id
- self.assertEquals(query, receivedQuery)
- self.assertEquals(receivedResponse, expectedResponse)
+ self.assertEqual(query, receivedQuery)
+ self.assertEqual(receivedResponse, expectedResponse)
conn = self.openTCPConnection()
response = self.recvTCPResponseOverConnection(conn)
if response is None:
break
- self.assertEquals(expectedResponse, response)
+ self.assertEqual(expectedResponse, response)
count = count + 1
except:
pass
response = self.recvTCPResponseOverConnection(conn)
if response is None:
break
- self.assertEquals(expectedResponse, response)
+ self.assertEqual(expectedResponse, response)
count = count + 1
except:
pass
response = self.recvTCPResponseOverConnection(conn)
if response is None:
break
- self.assertEquals(expectedResponse, response)
+ self.assertEqual(expectedResponse, response)
count = count + 1
except:
pass