1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s4:torture/drs: verify the whole metadata array to be the same in the repl_move tests

We've removed the difference compared to Windows and store metadata stamps for
some empty attributes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2016-07-07 16:04:14 +02:00 committed by Andrew Bartlett
parent 2a44b692c0
commit 769230a49a

View File

@ -103,28 +103,6 @@ class DrsMoveObjectTestCase(drs_base.DrsBaseTestCase):
def _check_metadata(self, user_dn, sam_ldb, drs, metadata, expected):
repl = ndr_unpack(drsblobs.replPropertyMetaDataBlob, str(metadata[0]))
# We should assert the entire array, but windows and Samba disagree
# both on sorting, and internal implementation behaviours show up in
# terms of the version.
#
# In particular, Windows seems to add password attributes that
# Samba doesn't add until they are actually needed. So we
# optionally permit that all the password attributes are omited
password_attids = set([DRSUAPI_ATTID_dBCSPwd,
DRSUAPI_ATTID_unicodePwd,
DRSUAPI_ATTID_lmPwdHistory,
DRSUAPI_ATTID_ntPwdHistory,
DRSUAPI_ATTID_logonHours])
if len(repl.ctr.array) != len(expected):
new_expected = []
for e in expected:
(attid, orig_dsa, version) = e
if attid not in password_attids:
new_expected.append(e)
expected = new_expected
self.assertEqual(len(repl.ctr.array), len(expected))
i = 0