From: Kamen Mazdrashki Date: Fri, 18 Feb 2011 02:27:19 +0000 (+0200) Subject: s4/drs-tests: Allow _net_drs_replicate to force replication and return output from... X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=adfb618ef5f7307bb5cf68185c6055375196db3a s4/drs-tests: Allow _net_drs_replicate to force replication and return output from command execution --- diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py index 7a56e43720f2..56d1ebe79557 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 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 cmd_line = "%s %s %s %s" % (samba_tool_cmdline, DC, fromDC, nc_dn) - self.check_run(cmd_line) + return self.check_output(cmd_line)