summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-30 17:48:51 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-30 18:15:31 +0000
commitc0ebf5d7435c3c4968eefafc6c566dc818e600a0 (patch)
tree1945e6c2aa0442498b81175fde1427bd097e3949 /source4/dsdb/tests/python
parent98fefa8a017bbb67f6c33080c8a80c77c34e42b8 (diff)
downloadsamba-c0ebf5d7435c3c4968eefafc6c566dc818e600a0.tar.gz
samba-c0ebf5d7435c3c4968eefafc6c566dc818e600a0.tar.bz2
samba-c0ebf5d7435c3c4968eefafc6c566dc818e600a0.zip
s4:sam.py - add a short double swap "primaryGroupID" test
It's not really meaningful but can happen. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sat Oct 30 18:15:31 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/dsdb/tests/python')
-rwxr-xr-xsource4/dsdb/tests/python/sam.py9
1 files changed, 9 insertions, 0 deletions
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,