]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pytest: dns_aging: helper to get non-tombstoned records
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Mon, 14 Jun 2021 11:37:37 +0000 (23:37 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 20 Jun 2021 23:26:32 +0000 (23:26 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/dns_aging.py

index 2d4342ca6ed045d32c604f95620c05b1419c7e46..e826817c55791e694f310e0c236c0f35e7855920 100644 (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