dns: Use ldb.SCOPE_SUBTREE in ldap_get_records() routine in tests/dns.py
authorAaron Haslett <aaronhaslett@catalyst.net.nz>
Tue, 10 Jul 2018 01:23:42 +0000 (13:23 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 Jul 2018 02:31:55 +0000 (04:31 +0200)
commit6bd2f82b9ff7629effe8280ab8f6bf9d721cf767
treeb67ef76a0b8386c805c854f2f5e74454a0cac76f
parent00002b8df9b865b896d264ee22bf6f22cf935f56
dns: Use ldb.SCOPE_SUBTREE in ldap_get_records() routine in tests/dns.py

DNS records have the odd property that the DN can be reliably determined by the
name only, so we do not need a subtree search.

However by using a subtree search under the zone we can without
trapping exceptions confirm if the record exists or not in the tests.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10812

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
python/samba/tests/dns.py