From: Douglas Bagnall Date: Thu, 29 May 2025 23:27:30 +0000 (+1200) Subject: pytests: samba_dnsupdate --use-samba-tool versus existing records X-Git-Tag: tevent-0.17.0~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e5b17adb004ea26c0747719f096297709f7cf7f;p=thirdparty%2Fsamba.git pytests: samba_dnsupdate --use-samba-tool versus existing records BUG: https://bugzilla.samba.org/show_bug.cgi?id=13613 Signed-off-by: Douglas Bagnall Reviewed-by: Jennifer Sutton Reviewed-by: Rowland Penny --- diff --git a/python/samba/tests/blackbox/samba_dnsupdate.py b/python/samba/tests/blackbox/samba_dnsupdate.py index e2c1e1450ee..65cb703a3c7 100644 --- a/python/samba/tests/blackbox/samba_dnsupdate.py +++ b/python/samba/tests/blackbox/samba_dnsupdate.py @@ -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 index 00000000000..5d7dd2836c2 --- /dev/null +++ b/selftest/knownfail.d/samba_dnsupdate @@ -0,0 +1 @@ +^samba.tests.blackbox.samba_dnsupdate.+SambaDnsUpdateTests.test_samba_dnsupdate_samba_tool_all_names