s4:torture/drs: verify the whole metadata array to be the same in the repl_move tests
authorStefan Metzmacher <metze@samba.org>
Thu, 7 Jul 2016 14:04:14 +0000 (16:04 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 8 Jul 2016 08:01:20 +0000 (10:01 +0200)
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>
source4/torture/drs/python/repl_move.py

index 9fd0adc39808e219519f72328cd0c5681a7a5c39..41a364e5628475ea065db393d10b4aaae8d4fb5b 100644 (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