s4:ldb/tests: do a "schemaUpdateNow" after creating a new attribute in ldap_schema.py
authorStefan Metzmacher <metze@samba.org>
Wed, 13 Jan 2010 10:45:05 +0000 (11:45 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 13 Jan 2010 15:03:52 +0000 (16:03 +0100)
It seems that windows doesn't need that.

And we should think about a check for reloading the schema
at the start of each "write" operation.

metze

source4/lib/ldb/tests/python/ldap_schema.py

index 9e547321048e0e55e750fce17c0ec7e81bf34b14..69b48cb867b3d9aadf2aeee147076ae80931ef63 100755 (executable)
@@ -139,6 +139,16 @@ systemOnly: FALSE
         self.assertEquals(res[0]["lDAPDisplayName"][0], attr_ldap_display_name)
         self.assertTrue("schemaIDGUID" in res[0])
 
+        # Samba requires a "schemaUpdateNow" here.
+        # TODO: remove this when Samba is fixed
+        ldif = """
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+"""
+        self.ldb.modify_ldif(ldif)
+
         class_name = "test-Class" + time.strftime("%s", time.gmtime())
         class_ldap_display_name = class_name.replace("-", "")