1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

pytest: dns_aging: helper to get non-tombstoned records

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2021-06-14 23:37:37 +12:00 committed by Andrew Bartlett
parent ad6d5a9c16
commit b173028836

View File

@ -399,6 +399,14 @@ class TestDNSAging(DNSTest):
records = node.get('dnsRecord')
return [ndr_unpack(dnsp.DnssrvRpcRecord, r) for r in records]
def ldap_get_non_tombstoned_records(self, name):
all_records = self.ldap_get_records(name)
records = []
for r in all_records:
if r.wType != dnsp.DNS_TYPE_TOMBSTONE:
records.append(r)
return records
def assert_tombstoned(self, name, tombstoned=True, timestamp=None):
# If run with tombstoned=False, assert it isn't tombstoned
# (and has no traces of tombstone). Otherwise assert it has