summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2011-02-18 04:27:19 +0200
committerKamen Mazdrashki <kamenim@samba.org>2011-02-20 23:13:11 +0200
commitadfb618ef5f7307bb5cf68185c6055375196db3a (patch)
tree0e15ee09b1f6b2ac902286468003e34633db976a
parent288e20cfb7c7e39bfd07626c77a9a0eaa8955bcf (diff)
downloadsamba-adfb618ef5f7307bb5cf68185c6055375196db3a.tar.gz
samba-adfb618ef5f7307bb5cf68185c6055375196db3a.tar.bz2
samba-adfb618ef5f7307bb5cf68185c6055375196db3a.zip
s4/drs-tests: Allow _net_drs_replicate to force replication and return output from command execution
-rw-r--r--source4/torture/drs/python/drs_base.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py
index 7a56e43720..56d1ebe795 100644
--- a/source4/torture/drs/python/drs_base.py
+++ b/source4/torture/drs/python/drs_base.py
@@ -98,12 +98,14 @@ class DrsBaseTestCase(samba.tests.BlackboxTestCase):
# bin/samba-tool drs <drs_command> <cmdline_auth>
return "%s drs %s %s" % (samba_tool_cmd, drs_command, cmdline_auth)
- def _net_drs_replicate(self, DC, fromDC, nc_dn=None):
+ def _net_drs_replicate(self, DC, fromDC, nc_dn=None, forced=True):
if nc_dn is None:
nc_dn = self.domain_dn
# make base command line
samba_tool_cmdline = self._samba_tool_cmdline("replicate")
+ if forced:
+ samba_tool_cmdline += " --sync-forced"
# bin/samba-tool drs replicate <Dest_DC_NAME> <Src_DC_NAME> <Naming Context>
cmd_line = "%s %s %s %s" % (samba_tool_cmdline, DC, fromDC, nc_dn)
- self.check_run(cmd_line)
+ return self.check_output(cmd_line)