mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
samba-tool drs showrepl test: turn subprocess error into failure
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
2860bd0777
commit
64e3502198
@ -235,23 +235,29 @@ class SambaToolDrsShowReplTests(drs_base.DrsBaseTestCase):
|
||||
self._enable_all_repl(self.dc1)
|
||||
self._force_all_reps(samdb1, self.dc1, 'inbound')
|
||||
self._force_all_reps(samdb1, self.dc1, 'outbound')
|
||||
try:
|
||||
out = self.check_output(
|
||||
"samba-tool drs showrepl --pull-summary %s %s" %
|
||||
(self.dc1, self.cmdline_creds))
|
||||
self.assertStringsEqual(out, "[ALL GOOD]\n")
|
||||
|
||||
out = self.check_output("samba-tool drs showrepl --pull-summary %s %s" %
|
||||
(self.dc1, self.cmdline_creds))
|
||||
self.assertStringsEqual(out, "[ALL GOOD]\n")
|
||||
out = self.check_output("samba-tool drs showrepl --pull-summary "
|
||||
"--color=yes %s %s" %
|
||||
(self.dc1, self.cmdline_creds))
|
||||
self.assertStringsEqual(out, "\033[1;32m[ALL GOOD]\033[0m\n")
|
||||
|
||||
out = self.check_output("samba-tool drs showrepl --pull-summary "
|
||||
"--color=yes %s %s" %
|
||||
(self.dc1, self.cmdline_creds))
|
||||
self.assertStringsEqual(out, "\033[1;32m[ALL GOOD]\033[0m\n")
|
||||
# --verbose output is still quiet when all is good.
|
||||
out = self.check_output(
|
||||
"samba-tool drs showrepl --pull-summary -v %s %s" %
|
||||
(self.dc1, self.cmdline_creds))
|
||||
self.assertStringsEqual(out, "[ALL GOOD]\n")
|
||||
out = self.check_output("samba-tool drs showrepl --pull-summary -v "
|
||||
"--color=yes %s %s" %
|
||||
(self.dc1, self.cmdline_creds))
|
||||
|
||||
except samba.tests.BlackboxProcessError as e:
|
||||
self.fail(str(e))
|
||||
|
||||
# --verbose output is still quiet when all is good.
|
||||
out = self.check_output("samba-tool drs showrepl --pull-summary -v %s %s" %
|
||||
(self.dc1, self.cmdline_creds))
|
||||
self.assertStringsEqual(out, "[ALL GOOD]\n")
|
||||
out = self.check_output("samba-tool drs showrepl --pull-summary -v "
|
||||
"--color=yes %s %s" %
|
||||
(self.dc1, self.cmdline_creds))
|
||||
self.assertStringsEqual(out, "\033[1;32m[ALL GOOD]\033[0m\n")
|
||||
|
||||
def test_samba_tool_showrepl_summary_forced_failure(self):
|
||||
|
Loading…
Reference in New Issue
Block a user