mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
samba-tool rodc: consistently use self.outf, not stdout
This increases the output of some commands from the point of view of tests which read the outf, so we also need to change those tests a bit. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
055b7308d2
commit
f6f192934c
@ -149,9 +149,9 @@ class cmd_rodc_preload(Command):
|
||||
local_samdb.transaction_commit()
|
||||
|
||||
if len(errors) > 0:
|
||||
print "\nPreload encountered problematic users:"
|
||||
self.message("\nPreload encountered problematic users:")
|
||||
for error in errors:
|
||||
print " %s" % error
|
||||
self.message(" %s" % error)
|
||||
|
||||
|
||||
class cmd_rodc(SuperCommand):
|
||||
|
@ -104,7 +104,8 @@ class RodcCmdTestCase(SambaToolCmdTest):
|
||||
"--server", os.environ["DC_SERVER"],
|
||||
"--ignore-errors")
|
||||
self.assertCmdSuccess(result, out, err, "ensuring rodc prefetch ran successfully")
|
||||
self.assertEqual(out, "Replicating DN CN=sambatool5,CN=Users,%s\n" % self.base_dn)
|
||||
self.assertTrue(out.startswith("Replicating DN CN=sambatool5,CN=Users,%s\n"
|
||||
% self.base_dn))
|
||||
|
||||
def test_multi_with_missing_name_failure(self):
|
||||
(result, out, err) = self.runsubcmd("rodc", "preload",
|
||||
@ -119,7 +120,9 @@ class RodcCmdTestCase(SambaToolCmdTest):
|
||||
"--server", os.environ["DC_SERVER"],
|
||||
"--ignore-errors")
|
||||
self.assertCmdSuccess(result, out, err, "ensuring rodc prefetch ran successfully")
|
||||
self.assertEqual(out, "Replicating DN CN=sambatool6,CN=Users,%s\nReplicating DN CN=sambatool5,CN=Users,%s\n" % (self.base_dn, self.base_dn))
|
||||
self.assertTrue(out.startswith("Replicating DN CN=sambatool6,CN=Users,%s\n"
|
||||
"Replicating DN CN=sambatool5,CN=Users,%s\n"
|
||||
% (self.base_dn, self.base_dn)))
|
||||
|
||||
def test_multi_without_group_failure(self):
|
||||
(result, out, err) = self.runsubcmd("rodc", "preload",
|
||||
|
Loading…
x
Reference in New Issue
Block a user