From: Douglas Bagnall Date: Thu, 8 Aug 2024 22:16:29 +0000 (+1200) Subject: s4:drs:tests: add hook for changing highwatermark X-Git-Tag: samba-4.21.3~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec6263a3f0e5cd1c50f460aea9a85562d6e9e500;p=thirdparty%2Fsamba.git s4:drs:tests: add hook for changing highwatermark BUG: https://bugzilla.samba.org/show_bug.cgi?id=15701 Signed-off-by: Douglas Bagnall Reviewed-by: Jennifer Sutton (cherry picked from commit 796e92a530004406dcb3fea33f54833c722480a0) --- diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py index bf98e599784..10aa17fb0ec 100644 --- a/source4/torture/drs/python/drs_base.py +++ b/source4/torture/drs/python/drs_base.py @@ -311,6 +311,13 @@ class DrsBaseTestCase(SambaToolCmdTest): if drs_handle is None: drs_handle = self.drs_handle + # Add a modify_highwatermark method to cause damage to the + # highwatermark. For example, it could set reserved_usn to + # zero as Entra ID does. + modify_hwm = getattr(self, "modify_highwatermark", None) + if modify_hwm is not None: + modify_hwm(highwatermark) + req10 = self._getnc_req10(dest_dsa=dest_dsa, invocation_id=invocation_id, nc_dn_str=nc_dn_str,