From: Douglas Bagnall Date: Mon, 14 Jun 2021 11:37:37 +0000 (+1200) Subject: pytest: dns_aging: helper to get non-tombstoned records X-Git-Tag: tevent-0.11.0~307 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1730288368ade0daef637aace47de64f2aa8442;p=thirdparty%2Fsamba.git pytest: dns_aging: helper to get non-tombstoned records Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/dns_aging.py b/python/samba/tests/dns_aging.py index 2d4342ca6ed..e826817c557 100644 --- a/python/samba/tests/dns_aging.py +++ b/python/samba/tests/dns_aging.py @@ -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