summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2018-01-31 16:13:14 +1300
committerAndrew Bartlett <abartlet@samba.org>2018-02-08 10:00:12 +0100
commitc7d0e6f39b15e54264dff2a897256f6bf9736333 (patch)
tree6dfd90ccc38cd58898c3f8a5e4b61b20f775293e /python
parent90e74fc15a8366c775d12a0817b63b6539f1cdd6 (diff)
downloadsamba-c7d0e6f39b15e54264dff2a897256f6bf9736333.tar.gz
samba-tool/tests: Check that dns cleanup does not spuriously remove entries
This might happen in the multi-record case. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 8 10:00:13 CET 2018 on sn-devel-144
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/samba_tool/dnscmd.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/samba/tests/samba_tool/dnscmd.py b/python/samba/tests/samba_tool/dnscmd.py
index 780af4f8bd0..bcd2c73981b 100644
--- a/python/samba/tests/samba_tool/dnscmd.py
+++ b/python/samba/tests/samba_tool/dnscmd.py
@@ -800,7 +800,7 @@ class DnsCmdTestCase(SambaToolCmdTest):
base="DC=DomainDnsZones,{}".format(self.samdb.get_default_basedn()),
scope=ldb.SCOPE_SUBTREE,
expression="(&(objectClass=dnsNode)(name={}))".format(srv_name),
- attrs=['dnsRecord'])
+ attrs=['dnsRecord', 'dNSTombstoned'])
# dnsRecord for host1 should be deleted
self.assertEqual(len(records[0]['dnsRecord']), 1)
@@ -813,6 +813,10 @@ class DnsCmdTestCase(SambaToolCmdTest):
dnshostname2 = 'host2.{}'.format(self.zone.lower())
self.assertEqual(dns_record_obj.data.nameTarget, dnshostname2)
+ # assert that the record isn't spuriously tombstoned
+ self.assertTrue('dNSTombstoned' not in records[0] or
+ str(record['dNSTombstoned']) == 'FALSE')
+
def test_dns_wildcards(self):
"""
Ensure that DNS wild card entries can be added deleted and queried