From: Matthias Dieter Wallnöfer Date: Thu, 24 May 2012 20:27:46 +0000 (+0200) Subject: s4:sam.py - "servicePrincipalName" - test for case-insensitiveness X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=44353515af2;hp=376eb35f89943f6df7fa5ebc2cd5df1a0118785e;p=mdw%2Fsamba.git s4:sam.py - "servicePrincipalName" - test for case-insensitiveness After the LDB TDB changes regarding the use of schema comparison functions rather than bitwise checks this finally works as it should. --- diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py index c5727cd080..14c1df97e6 100755 --- a/source4/dsdb/tests/python/sam.py +++ b/source4/dsdb/tests/python/sam.py @@ -2446,6 +2446,17 @@ class SamTests(samba.tests.TestCase): except LdbError, (num, _): self.assertEquals(num, ERR_ATTRIBUTE_OR_VALUE_EXISTS) + # test for case-insensitiveness + m = Message() + m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) + m["servicePrincipalName"] = MessageElement("HOST/TESTNAME2.TESTDOM", + FLAG_MOD_ADD, "servicePrincipalName") + try: + ldb.modify(m) + self.fail() + except LdbError, (num, _): + self.assertEquals(num, ERR_ATTRIBUTE_OR_VALUE_EXISTS) + m = Message() m.dn = Dn(ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn) m["servicePrincipalName"] = MessageElement("HOST/testname3",