1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

samba-tool showrepl tests: test all-good with --pull-summary

We test the all-good case with --pull-summary, which is the only one
we can be reasonably certain about.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Jun 28 09:23:10 CEST 2018 on sn-devel-144
This commit is contained in:
Douglas Bagnall 2018-06-28 16:19:31 +12:00 committed by Douglas Bagnall
parent 2c9eeedc84
commit 211275fae6
2 changed files with 6 additions and 7 deletions

View File

@ -1 +0,0 @@
^samba4.drs.samba_tool_drs_showrepl.python.+samba_tool_drs_showrepl.SambaToolDrsShowReplTests.test_samba_tool_showrepl_pull_summary_all_good

View File

@ -222,8 +222,8 @@ class SambaToolDrsShowReplTests(drs_base.DrsBaseTestCase):
src, dest = dc, remote
self._net_drs_replicate(dest, src, forced=True)
def test_samba_tool_showrepl_summary_all_good(self):
"""Tests 'samba-tool drs showrepl --summary' command."""
def test_samba_tool_showrepl_pull_summary_all_good(self):
"""Tests 'samba-tool drs showrepl --pull-summary' command."""
# To be sure that all is good we need to force replication
# with everyone (because others might have it turned off), and
# turn replication on for them in case they suddenly decide to
@ -236,20 +236,20 @@ class SambaToolDrsShowReplTests(drs_base.DrsBaseTestCase):
self._force_all_reps(samdb1, self.dc1, 'inbound')
self._force_all_reps(samdb1, self.dc1, 'outbound')
out = self.check_output("samba-tool drs showrepl --summary %s %s" %
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 --summary "
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 --summary -v %s %s" %
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 --summary -v "
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")