diff options
author | Andrew Bartlett <abartlet@samba.org> | 2016-07-18 16:35:28 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2016-07-19 13:41:11 +0200 |
commit | 3a787f45cf150b8ff6c6c6ea268687f335d209bc (patch) | |
tree | 84b0565c1df9312cf5a38ac5eb6e6e88f22c0ee0 /source4 | |
parent | 6145da66efa732aabf6788e7e3c15fe10b0f6218 (diff) | |
download | samba-3a787f45cf150b8ff6c6c6ea268687f335d209bc.tar.gz |
selftest: Make repl_move more robust by disabling replication before the test
We do this before we ensure the two DCs are in sync, and then force the sync
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/drs/python/repl_move.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source4/torture/drs/python/repl_move.py b/source4/torture/drs/python/repl_move.py index 41a364e5628..d00d0940694 100644 --- a/source4/torture/drs/python/repl_move.py +++ b/source4/torture/drs/python/repl_move.py @@ -54,9 +54,14 @@ class DrsMoveObjectTestCase(drs_base.DrsBaseTestCase): def setUp(self): super(DrsMoveObjectTestCase, self).setUp() + # disable automatic replication temporary + self._disable_inbound_repl(self.dnsname_dc1) + self._disable_inbound_repl(self.dnsname_dc2) + # make sure DCs are synchronized before the test self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, forced=True) self._net_drs_replicate(DC=self.dnsname_dc1, fromDC=self.dnsname_dc2, forced=True) + self.ou1_dn = ldb.Dn(self.ldb_dc1, "OU=DrsOU1") self.ou1_dn.add_base(self.ldb_dc1.get_default_basedn()) ou1 = {} @@ -73,10 +78,6 @@ class DrsMoveObjectTestCase(drs_base.DrsBaseTestCase): ou2["ou"] = self.ou2_dn.get_component_value(0) self.ldb_dc1.add(ou2) - # disable automatic replication temporary - self._disable_inbound_repl(self.dnsname_dc1) - self._disable_inbound_repl(self.dnsname_dc2) - # trigger replication from DC1 to DC2 self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, forced=True) self.dc1_guid = self.ldb_dc1.get_invocation_id() @@ -1828,9 +1829,14 @@ class DrsMoveBetweenTreeOfObjectTestCase(drs_base.DrsBaseTestCase): def setUp(self): super(DrsMoveBetweenTreeOfObjectTestCase, self).setUp() + # disable automatic replication temporary + self._disable_inbound_repl(self.dnsname_dc1) + self._disable_inbound_repl(self.dnsname_dc2) + # make sure DCs are synchronized before the test self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, forced=True) self._net_drs_replicate(DC=self.dnsname_dc1, fromDC=self.dnsname_dc2, forced=True) + self.ou1_dn = ldb.Dn(self.ldb_dc1, "OU=DrsOU1") self.ou1_dn.add_base(self.ldb_dc1.get_default_basedn()) self.ou1 = {} @@ -1883,10 +1889,6 @@ class DrsMoveBetweenTreeOfObjectTestCase(drs_base.DrsBaseTestCase): self.ou6["objectclass"] = "organizationalUnit" self.ou6["ou"] = self.ou6_dn.get_component_value(0) - # disable automatic replication temporary - self._disable_inbound_repl(self.dnsname_dc1) - self._disable_inbound_repl(self.dnsname_dc2) - def tearDown(self): self.ldb_dc1.delete(self.ou1_dn, ["tree_delete:1"]) |