summaryrefslogtreecommitdiff
path: root/source4/torture/drs
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2011-02-22 03:40:07 +0200
committerKamen Mazdrashki <kamenim@samba.org>2011-02-27 00:23:19 +0200
commit281e3060451720445c4fb12f5dbbe5ccdc84ca92 (patch)
treebc0e4d65da5b363d271e89629fc032fc70c31f4d /source4/torture/drs
parent90d0d3e5f8ab1c5152163c83e423913a4c24ec9b (diff)
downloadsamba-281e3060451720445c4fb12f5dbbe5ccdc84ca92.tar.gz
samba-281e3060451720445c4fb12f5dbbe5ccdc84ca92.tar.bz2
samba-281e3060451720445c4fb12f5dbbe5ccdc84ca92.zip
s4/drs-tests: Disable replication during 'deleted object' test
This allows us to remove the patch that prevents the test failure. Also pass 'forced' flag to samba-tool drs replicate command, otherwise DsReplicaSync will fail with 'replication not permitted' error
Diffstat (limited to 'source4/torture/drs')
-rw-r--r--source4/torture/drs/python/delete_object.py27
1 files changed, 10 insertions, 17 deletions
diff --git a/source4/torture/drs/python/delete_object.py b/source4/torture/drs/python/delete_object.py
index b652377ec7..64f8cfe5dd 100644
--- a/source4/torture/drs/python/delete_object.py
+++ b/source4/torture/drs/python/delete_object.py
@@ -44,8 +44,13 @@ class DrsDeleteObjectTestCase(drs_base.DrsBaseTestCase):
def setUp(self):
super(DrsDeleteObjectTestCase, self).setUp()
+ # disable automatic replication temporary
+ self._disable_inbound_repl(self.dnsname_dc1)
+ self._disable_inbound_repl(self.dnsname_dc2)
def tearDown(self):
+ self._enable_inbound_repl(self.dnsname_dc1)
+ self._enable_inbound_repl(self.dnsname_dc2)
super(DrsDeleteObjectTestCase, self).tearDown()
def _make_username(self):
@@ -112,38 +117,26 @@ class DrsDeleteObjectTestCase(drs_base.DrsBaseTestCase):
self._check_user(sam_ldb=self.ldb_dc1, user_orig=user_orig, is_deleted=False)
# trigger replication from DC1 to DC2
- self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1)
+ self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, forced=True)
# delete user on DC1
self.ldb_dc1.delete(user_dn)
# check user info on DC1 - should be deleted
self._check_user(sam_ldb=self.ldb_dc1, user_orig=user_orig, is_deleted=True)
# check user info on DC2 - should be valid user
- try:
- self._check_user(sam_ldb=self.ldb_dc2, user_orig=user_orig, is_deleted=False)
- except self.failureException:
- print ("Checking for not isDeleted user on %s failed, "
- "probably because a replication took place. "
- "Ideally we should block automatic replications during this test, "
- "but until then, just ignore the error" % self.dnsname_dc2)
+ self._check_user(sam_ldb=self.ldb_dc2, user_orig=user_orig, is_deleted=False)
# trigger replication from DC2 to DC1
# to check if deleted object gets restored
- self._net_drs_replicate(DC=self.dnsname_dc1, fromDC=self.dnsname_dc2)
+ self._net_drs_replicate(DC=self.dnsname_dc1, fromDC=self.dnsname_dc2, fored=True)
# check user info on DC1 - should be deleted
self._check_user(sam_ldb=self.ldb_dc1, user_orig=user_orig, is_deleted=True)
# check user info on DC2 - should be valid user
- try:
- self._check_user(sam_ldb=self.ldb_dc2, user_orig=user_orig, is_deleted=False)
- except self.failureException:
- print ("Checking for not isDeleted user on %s failed, "
- "probably because a replication took place. "
- "Ideally we should block automatic replications during this test, "
- "but until then, just ignore the error" % self.dnsname_dc2)
+ self._check_user(sam_ldb=self.ldb_dc2, user_orig=user_orig, is_deleted=False)
# trigger replication from DC1 to DC2
# to check if deleted object is replicated
- self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1)
+ self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, forced=True)
# check user info on DC1 - should be deleted
self._check_user(sam_ldb=self.ldb_dc1, user_orig=user_orig, is_deleted=True)
# check user info on DC2 - should be deleted