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 "
+ "--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))
- 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")
+ 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):