samba-tool drs showrepl tests: improve debugging for mystery error
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 10 Aug 2018 04:11:58 +0000 (16:11 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 10 Aug 2018 07:27:03 +0000 (09:27 +0200)
Under some circumstances the samba-tool command is failing with no
stdout output at all, leaving few clues in the logs.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Fri Aug 10 09:27:03 CEST 2018 on sn-devel-144

source4/torture/drs/python/samba_tool_drs_showrepl.py

index 54c38c0c6c2060519bbdd4bbecc21fc781704992..8c8d6476f437ad1fed2c98df4179d3eb15fcd99b 100644 (file)
@@ -311,7 +311,13 @@ class SambaToolDrsShowReplTests(drs_base.DrsBaseTestCase):
 
         except samba.tests.BlackboxProcessError as e:
             print("Good, failed as expected after %d rounds: %r" % (i, e.cmd))
-            self.assertIn('There are failing connections', e.stdout)
+            self.assertIn('There are failing connections', e.stdout,
+                          msg=('stdout: %r\nstderr: %r\nretcode: %s'
+                               '\nmessage: %r\ncmd: %r') % (e.stdout,
+                                                            e.stderr,
+                                                            e.returncode,
+                                                            e.msg,
+                                                            e.cmd))
             self.assertRegexpMatches(
                 e.stdout,
                 r'result 845[67] '