s4-test/repl_schema: Test classSchema and attributeSchema replication in separate...
authorKamen Mazdrashki <kamenim@samba.org>
Wed, 1 Dec 2010 18:22:06 +0000 (20:22 +0200)
committerKamen Mazdrashki <kamenim@samba.org>
Thu, 2 Dec 2010 17:02:52 +0000 (19:02 +0200)
source4/torture/drs/python/repl_schema.py

index 02e2afeee8a9749a23e8d17da0f3f068e2f490f3..ef810f63bd12244a8157aedfc01207ab3ab258db 100644 (file)
@@ -172,6 +172,24 @@ class DrsReplSchemaTestCase(samba.tests.TestCase):
         self.assertEquals(len(res_dc2), 1,
                           "%s doesn't exists on %s" % (obj_dn, self.dnsname_dc2))
 
+    def test_class(self):
+        """Simple test for classSchema replication"""
+        # add new classSchema object
+        (c_ldn, c_dn) = self._schema_new_class(self.ldb_dc1, "cls-S")
+        # force replication from DC1 to DC2
+        self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, nc_dn=self.schema_dn)
+        # check object is replicated
+        self._check_object(c_dn)
+
+    def test_attribute(self):
+        """Simple test for attributeSchema replication"""
+        # add new attributeSchema object
+        (a_ldn, a_dn) = self._schema_new_attr(self.ldb_dc1, "attr-S")
+        # force replication from DC1 to DC2
+        self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, nc_dn=self.schema_dn)
+        # check objects is replicated
+        self._check_object(a_dn)
+
     def test_all(self):
         """Basic plan is to create bunch of classSchema
            and attributeSchema objects, replicate Schema NC