mirror of
https://github.com/samba-team/samba.git
synced 2025-11-11 00:23:51 +03:00
s4 dns: Test QCLASS_NONE query
Autobuild-User: Kai Blin <kai@samba.org> Autobuild-Date: Thu Nov 24 14:10:45 CET 2011 on sn-devel-104
This commit is contained in:
@@ -141,6 +141,20 @@ class DNSTest(TestCase):
|
||||
if dc_ipv6 is not None:
|
||||
self.assertEquals(response.answers[1].rdata, dc_ipv6)
|
||||
|
||||
def test_qclass_none_query(self):
|
||||
"create a QCLASS_NONE query"
|
||||
p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
|
||||
questions = []
|
||||
|
||||
name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
|
||||
q = self.make_name_question(name, dns.DNS_QTYPE_ALL, dns.DNS_QCLASS_NONE)
|
||||
questions.append(q)
|
||||
|
||||
self.finish_name_packet(p, questions)
|
||||
response = self.dns_transaction_udp(p)
|
||||
self.assert_dns_rcode_equals(response, dns.DNS_RCODE_NOTIMP)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import unittest
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user