From 0615268a1c0149d5acee9138873c1ed641637e0d Mon Sep 17 00:00:00 2001 From: Jennifer Sutton Date: Tue, 29 Jul 2025 15:02:32 +1200 Subject: [PATCH] =?utf8?q?s4:dsdb:tests:=20Correct=20unprefixed=20f?= =?utf8?q?=E2=80=90string?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jennifer Sutton Reviewed-by: Douglas Bagnall --- .../knownfail.d/modify_spn_matching_original_dns_host_name | 1 + source4/dsdb/tests/python/acl.py | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 selftest/knownfail.d/modify_spn_matching_original_dns_host_name diff --git a/selftest/knownfail.d/modify_spn_matching_original_dns_host_name b/selftest/knownfail.d/modify_spn_matching_original_dns_host_name new file mode 100644 index 00000000000..2f90b37479b --- /dev/null +++ b/selftest/knownfail.d/modify_spn_matching_original_dns_host_name @@ -0,0 +1 @@ +^samba4\.ldap\.acl\.python\(.*\)\.__main__\.AclModifyTests\.test_modify_spn_matching_dns_host_name_original\(.*\)$ diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py index 5cbf8ef2e70..d07f41370da 100755 --- a/source4/dsdb/tests/python/acl.py +++ b/source4/dsdb/tests/python/acl.py @@ -3667,7 +3667,7 @@ Member: CN=test_modify_user2,CN=Users,""" + self.base_dn self.sd_utils.dacl_add_ace(ou_dn, mod) original_host_name = 'invalid_host_name' - original_spn = 'host/{original_host_name}' + original_spn = f'host/{original_host_name}' # Create the account. self.ldb_admin.add({ @@ -3688,10 +3688,7 @@ Member: CN=test_modify_user2,CN=Users,""" + self.base_dn 'dNSHostName') try: self.ldb_user.modify(m) - except LdbError as err: - num, estr = err.args - self.assertEqual(ERR_CONSTRAINT_VIOLATION, num) - else: + except LdbError: self.fail() def test_modify_dns_host_name_spn_matching_account_name_original(self): -- 2.47.3