]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pytests: samba_dnsupdate --use-samba-tool versus existing records
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 29 May 2025 23:27:30 +0000 (11:27 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 5 Jun 2025 23:06:37 +0000 (23:06 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13613

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Rowland Penny <rpenny@samba.org>
python/samba/tests/blackbox/samba_dnsupdate.py
selftest/knownfail.d/samba_dnsupdate [new file with mode: 0644]

index e2c1e1450ee2e50eec541c829335e1dca9f9a496..65cb703a3c7a31de05d636dee1ff0f6f35439f03 100644 (file)
@@ -123,3 +123,16 @@ class SambaDnsUpdateTests(samba.tests.BlackboxTestCase):
                             errf=StringIO())
         if result is not None:
             self.fail("Error deleting site")
+
+    def test_samba_dnsupdate_samba_tool_all_names(self):
+        """We ask it to update all names, which should all already
+        exist and cause no errors."""
+        try:
+            out = self.check_output(["samba_dnsupdate",
+                                     "--verbose",
+                                     "--use-samba-tool",
+                                     "--all-names"])
+        except samba.tests.BlackboxProcessError as e:
+            self.fail(f"samba_dnsupdate returned an error: {e}")
+        self.assertIn(b"Record already exists", out)
+        self.assertNotIn(b"ERROR", out)
diff --git a/selftest/knownfail.d/samba_dnsupdate b/selftest/knownfail.d/samba_dnsupdate
new file mode 100644 (file)
index 0000000..5d7dd28
--- /dev/null
@@ -0,0 +1 @@
+^samba.tests.blackbox.samba_dnsupdate.+SambaDnsUpdateTests.test_samba_dnsupdate_samba_tool_all_names