]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pytest: dns_aging: try queries of recently tombstoned nodes
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Mon, 14 Jun 2021 11:41:07 +0000 (23:41 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 20 Jun 2021 23:26:32 +0000 (23:26 +0000)
Windows fails this one.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/dns_aging.py

index df1ea026393945e4302e09af8f80af980df7ce35..5a6c7346d5fda23941349508bfd6c73b145e1bea 100644 (file)
@@ -1970,6 +1970,22 @@ class TestDNSAging(DNSTest):
             elif d == txt3:
                 self.assertNotEqual(r.dwTimeStamp, 0)
 
+    def test_dns_query_for_tombstoned_results(self):
+        # This one fails on Windows, because the dns cache holds B
+        # after it has been tombstoned behind its back.
+        A = 'a'
+        B = 'b'
+        self.dns_tombstone(A)
+        self.assert_tombstoned(A)
+        r = self.dns_query(A, qtype=dns.DNS_QTYPE_TXT)
+        self.assertEqual(r.ancount, 0)
+
+        self.dns_update_record(B, B)
+        self.dns_tombstone(B)
+        self.assert_tombstoned(B)
+        r = self.dns_query(B, qtype=dns.DNS_QTYPE_TXT)
+        self.assertEqual(r.ancount, 0)
+
     def test_basic_scavenging(self):
         # NOTE: This one fails on Windows, because the RPC call to
         # prompt scavenging is not immediate. On Samba, in the