summaryrefslogtreecommitdiff
path: root/source4/torture/drs
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-12-02 01:01:20 +0200
committerKamen Mazdrashki <kamenim@samba.org>2010-12-02 19:02:55 +0200
commitc1fef7efc7bfdd03049511cbfad8395439660912 (patch)
tree89c24784f383bb008eaca6b609b913c571d38c24 /source4/torture/drs
parent5bc11855f6d1b9ae4a7a653028f0614e797dd974 (diff)
downloadsamba-c1fef7efc7bfdd03049511cbfad8395439660912.tar.gz
samba-c1fef7efc7bfdd03049511cbfad8395439660912.tar.bz2
samba-c1fef7efc7bfdd03049511cbfad8395439660912.zip
s4-test/repl_schema: Test class inheritance through subClassOf
Diffstat (limited to 'source4/torture/drs')
-rw-r--r--source4/torture/drs/python/repl_schema.py27
1 files changed, 26 insertions, 1 deletions
diff --git a/source4/torture/drs/python/repl_schema.py b/source4/torture/drs/python/repl_schema.py
index 7a4c2eaf68..9bb12a2bb1 100644
--- a/source4/torture/drs/python/repl_schema.py
+++ b/source4/torture/drs/python/repl_schema.py
@@ -182,13 +182,38 @@ class DrsReplSchemaTestCase(samba.tests.TestCase):
# check object is replicated
self._check_object(c_dn)
+ def test_classInheritance(self):
+ """Test inheritance through subClassOf
+ I think 5 levels of inheritance is pretty decent for now."""
+ # add 5 levels deep hierarchy
+ c_dn_list = []
+ c_ldn_last = None
+ for i in range(1, 6):
+ base_name = "cls-I-%02d" % i
+ (c_ldn, c_dn) = self._schema_new_class(self.ldb_dc1, base_name)
+ c_dn_list.append(c_dn)
+ if c_ldn_last:
+ # inherit from last class added
+ m = Message.from_dict(self.ldb_dc1,
+ {"dn": c_dn,
+ "subClassOf": c_ldn_last},
+ FLAG_MOD_REPLACE)
+ self.ldb_dc1.modify(m)
+ # store last class ldapDisplayName
+ c_ldn_last = c_ldn
+ # 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 are replicated
+ for c_dn in c_dn_list:
+ 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
+ # check object is replicated
self._check_object(a_dn)
def test_all(self):