From c0ebf5d7435c3c4968eefafc6c566dc818e600a0 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 30 Oct 2010 17:48:51 +0200 Subject: s4:sam.py - add a short double swap "primaryGroupID" test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's not really meaningful but can happen. Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Sat Oct 30 18:15:31 UTC 2010 on sn-devel-104 --- source4/dsdb/tests/python/sam.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/dsdb') diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py index ce720b76cb..bbcc4a818e 100755 --- a/source4/dsdb/tests/python/sam.py +++ b/source4/dsdb/tests/python/sam.py @@ -402,6 +402,15 @@ class SamTests(unittest.TestCase): FLAG_MOD_REPLACE, "primaryGroupID") ldb.modify(m) + # Swap the groups (does not really make sense but does the same) + m = Message() + m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn) + m["primaryGroupID"] = MessageElement(str(group_rid_1), + FLAG_MOD_REPLACE, "primaryGroupID") + m["primaryGroupID"] = MessageElement(str(group_rid_2), + FLAG_MOD_REPLACE, "primaryGroupID") + ldb.modify(m) + # Old primary group should contain a "member" attribute for the user, # the new shouldn't contain anymore one res1 = ldb.search("cn=ldaptestgroup, cn=users," + self.base_dn, -- cgit