From: Remi Gacogne Date: Fri, 8 Mar 2019 17:44:36 +0000 (+0100) Subject: dnsdist: Disable regression tests for invalid AXFR X-Git-Tag: dnsdist-1.4.0-alpha1~25^2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31abd117a4bd419ce5b642222dc923059c5ab2b6;p=pdns dnsdist: Disable regression tests for invalid AXFR The new implementation does not try to be too smart about that anymore. --- diff --git a/regression-tests.dnsdist/test_AXFR.py b/regression-tests.dnsdist/test_AXFR.py index 4bb4c543f..6bc500461 100644 --- a/regression-tests.dnsdist/test_AXFR.py +++ b/regression-tests.dnsdist/test_AXFR.py @@ -165,111 +165,111 @@ class TestAXFR(DNSDistTest): self.assertEqual(query, receivedQuery) self.assertEqual(len(receivedResponses), len(responses)) - def testFourNoFirstSOAAXFR(self): - """ - AXFR: Four messages, no SOA in the first one - """ - name = 'fournosoainfirst.axfr.tests.powerdns.com.' - query = dns.message.make_query(name, 'AXFR', 'IN') - responses = [] - soa = dns.rrset.from_text(name, - 60, - dns.rdataclass.IN, - dns.rdatatype.SOA, - 'ns.' + name + ' hostmaster.' + name + ' 1 3600 3600 3600 60') - response = dns.message.make_response(query) - response.answer.append(dns.rrset.from_text(name, - 60, - dns.rdataclass.IN, - dns.rdatatype.A, - '192.0.2.1')) - responses.append(response) + # def testFourNoFirstSOAAXFR(self): + # """ + # AXFR: Four messages, no SOA in the first one + # """ + # name = 'fournosoainfirst.axfr.tests.powerdns.com.' + # query = dns.message.make_query(name, 'AXFR', 'IN') + # responses = [] + # soa = dns.rrset.from_text(name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.SOA, + # 'ns.' + name + ' hostmaster.' + name + ' 1 3600 3600 3600 60') + # response = dns.message.make_response(query) + # response.answer.append(dns.rrset.from_text(name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.A, + # '192.0.2.1')) + # responses.append(response) - response = dns.message.make_response(query) - rrset = dns.rrset.from_text(name, - 60, - dns.rdataclass.IN, - dns.rdatatype.AAAA, - '2001:DB8::1') - response.answer.append(soa) - response.answer.append(rrset) - responses.append(response) + # response = dns.message.make_response(query) + # rrset = dns.rrset.from_text(name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.AAAA, + # '2001:DB8::1') + # response.answer.append(soa) + # response.answer.append(rrset) + # responses.append(response) - response = dns.message.make_response(query) - rrset = dns.rrset.from_text('dummy.' + name, - 60, - dns.rdataclass.IN, - dns.rdatatype.AAAA, - '2001:DB8::1') - response.answer.append(rrset) - responses.append(response) + # response = dns.message.make_response(query) + # rrset = dns.rrset.from_text('dummy.' + name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.AAAA, + # '2001:DB8::1') + # response.answer.append(rrset) + # responses.append(response) - response = dns.message.make_response(query) - rrset = dns.rrset.from_text(name, - 60, - dns.rdataclass.IN, - dns.rdatatype.TXT, - 'dummy') - response.answer.append(rrset) - response.answer.append(soa) - responses.append(response) + # response = dns.message.make_response(query) + # rrset = dns.rrset.from_text(name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.TXT, + # 'dummy') + # response.answer.append(rrset) + # response.answer.append(soa) + # responses.append(response) - (receivedQuery, receivedResponses) = self.sendTCPQueryWithMultipleResponses(query, responses) - receivedQuery.id = query.id - self.assertEqual(query, receivedQuery) - self.assertEqual(len(receivedResponses), 1) + # (receivedQuery, receivedResponses) = self.sendTCPQueryWithMultipleResponses(query, responses) + # receivedQuery.id = query.id + # self.assertEqual(query, receivedQuery) + # self.assertEqual(len(receivedResponses), 1) - def testFourLastSOAInSecondAXFR(self): - """ - AXFR: Four messages, SOA in the first one and the second one - """ - name = 'foursecondsoainsecond.axfr.tests.powerdns.com.' - query = dns.message.make_query(name, 'AXFR', 'IN') - responses = [] - soa = dns.rrset.from_text(name, - 60, - dns.rdataclass.IN, - dns.rdatatype.SOA, - 'ns.' + name + ' hostmaster.' + name + ' 1 3600 3600 3600 60') + # def testFourLastSOAInSecondAXFR(self): + # """ + # AXFR: Four messages, SOA in the first one and the second one + # """ + # name = 'foursecondsoainsecond.axfr.tests.powerdns.com.' + # query = dns.message.make_query(name, 'AXFR', 'IN') + # responses = [] + # soa = dns.rrset.from_text(name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.SOA, + # 'ns.' + name + ' hostmaster.' + name + ' 1 3600 3600 3600 60') - response = dns.message.make_response(query) - response.answer.append(soa) - response.answer.append(dns.rrset.from_text(name, - 60, - dns.rdataclass.IN, - dns.rdatatype.A, - '192.0.2.1')) - responses.append(response) + # response = dns.message.make_response(query) + # response.answer.append(soa) + # response.answer.append(dns.rrset.from_text(name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.A, + # '192.0.2.1')) + # responses.append(response) - response = dns.message.make_response(query) - response.answer.append(soa) - rrset = dns.rrset.from_text(name, - 60, - dns.rdataclass.IN, - dns.rdatatype.AAAA, - '2001:DB8::1') - response.answer.append(rrset) - responses.append(response) + # response = dns.message.make_response(query) + # response.answer.append(soa) + # rrset = dns.rrset.from_text(name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.AAAA, + # '2001:DB8::1') + # response.answer.append(rrset) + # responses.append(response) - response = dns.message.make_response(query) - rrset = dns.rrset.from_text('dummy.' + name, - 60, - dns.rdataclass.IN, - dns.rdatatype.AAAA, - '2001:DB8::1') - response.answer.append(rrset) - responses.append(response) + # response = dns.message.make_response(query) + # rrset = dns.rrset.from_text('dummy.' + name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.AAAA, + # '2001:DB8::1') + # response.answer.append(rrset) + # responses.append(response) - response = dns.message.make_response(query) - rrset = dns.rrset.from_text(name, - 60, - dns.rdataclass.IN, - dns.rdatatype.TXT, - 'dummy') - response.answer.append(rrset) - responses.append(response) + # response = dns.message.make_response(query) + # rrset = dns.rrset.from_text(name, + # 60, + # dns.rdataclass.IN, + # dns.rdatatype.TXT, + # 'dummy') + # response.answer.append(rrset) + # responses.append(response) - (receivedQuery, receivedResponses) = self.sendTCPQueryWithMultipleResponses(query, responses) - receivedQuery.id = query.id - self.assertEqual(query, receivedQuery) - self.assertEqual(len(receivedResponses), 2) + # (receivedQuery, receivedResponses) = self.sendTCPQueryWithMultipleResponses(query, responses) + # receivedQuery.id = query.id + # self.assertEqual(query, receivedQuery) + # self.assertEqual(len(receivedResponses), 2)