From adfb618ef5f7307bb5cf68185c6055375196db3a Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Fri, 18 Feb 2011 04:27:19 +0200 Subject: s4/drs-tests: Allow _net_drs_replicate to force replication and return output from command execution --- source4/torture/drs/python/drs_base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4') 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 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) -- cgit