diff options
author | Kai Blin <kai@samba.org> | 2015-07-17 15:27:51 +0200 |
---|---|---|
committer | Kai Blin <kai@samba.org> | 2015-08-06 14:06:52 +0200 |
commit | 42f38fe8d9a34a9d3710dcddfe642257f41ece87 (patch) | |
tree | 3741b75019e8dfb0d436b79f544f2868f2c867d6 /python/samba/tests/dns.py | |
parent | d9a3f197495951f2b85e042f1bc4525bab389879 (diff) | |
download | samba-42f38fe8d9a34a9d3710dcddfe642257f41ece87.tar.gz |
dns: always add authority records
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Thu Aug 6 14:06:52 CEST 2015 on sn-devel-104
Diffstat (limited to 'python/samba/tests/dns.py')
-rw-r--r-- | python/samba/tests/dns.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py index 04ac3567ed7..044eaf64e9f 100644 --- a/python/samba/tests/dns.py +++ b/python/samba/tests/dns.py @@ -247,23 +247,23 @@ class TestSimpleQueries(DNSTest): response = self.dns_transaction_udp(p) self.assert_dns_rcode_equals(response, dns.DNS_RCODE_NOTIMP) -# Only returns an authority section entry in BIND and Win DNS -# FIXME: Enable one Samba implements this feature -# def test_soa_hostname_query(self): -# "create a SOA query for a hostname" -# p = self.make_name_packet(dns.DNS_OPCODE_QUERY) -# questions = [] -# -# name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain()) -# q = self.make_name_question(name, dns.DNS_QTYPE_SOA, dns.DNS_QCLASS_IN) -# questions.append(q) -# -# self.finish_name_packet(p, questions) -# response = self.dns_transaction_udp(p) -# self.assert_dns_rcode_equals(response, dns.DNS_RCODE_OK) -# self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY) -# # We don't get SOA records for single hosts -# self.assertEquals(response.ancount, 0) + def test_soa_hostname_query(self): + "create a SOA query for a hostname" + p = self.make_name_packet(dns.DNS_OPCODE_QUERY) + questions = [] + + name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain()) + q = self.make_name_question(name, dns.DNS_QTYPE_SOA, dns.DNS_QCLASS_IN) + questions.append(q) + + self.finish_name_packet(p, questions) + response = self.dns_transaction_udp(p) + self.assert_dns_rcode_equals(response, dns.DNS_RCODE_OK) + self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY) + # We don't get SOA records for single hosts + self.assertEquals(response.ancount, 0) + # But we do respond with an authority section + self.assertEqual(response.nscount, 1) def test_soa_domain_query(self): "create a SOA query for a domain" |