mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
SambaToolCmdTest: let assertCmdSuccess() escape ']\n' lines
This gives a much higher chance to see the actual problem without having them filtered by various 'filter-subunit' invocations. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
committed by
Douglas Bagnall
parent
40079975f7
commit
b3ffc61e2f
@ -105,8 +105,11 @@ class SambaToolCmdTest(samba.tests.BlackboxTestCase):
|
||||
return (result, cmd.outf.getvalue(), cmd.errf.getvalue())
|
||||
|
||||
def assertCmdSuccess(self, exit, out, err, msg=""):
|
||||
self.assertIsNone(exit, msg="exit[%s] stdout[%s] stderr[%s]: %s" % (
|
||||
exit, out, err, msg))
|
||||
# Make sure we allow '\n]\n' in stdout and stderr
|
||||
# without causing problems with the subunit protocol.
|
||||
# We just inject a space...
|
||||
msg = "exit[%s] stdout[%s] stderr[%s]: %s" % (exit, out, err, msg)
|
||||
self.assertIsNone(exit, msg=msg.replace("\n]\n", "\n] \n"))
|
||||
|
||||
def assertCmdFail(self, val, msg=""):
|
||||
self.assertIsNotNone(val, msg)
|
||||
|
Reference in New Issue
Block a user