diff options
author | Matthieu Patou <mat@matws.net> | 2013-05-05 15:37:00 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-05-06 21:05:29 +1200 |
commit | fffbdf01fa6a74e6da70815607a1c22b9b6ebcdb (patch) | |
tree | 1f5184d62ef7fb865702bb3c418ee1512323657b | |
parent | 1160b699cb73cc466163504ebb7299912f10cd9b (diff) | |
download | samba-fffbdf01fa6a74e6da70815607a1c22b9b6ebcdb.tar.gz samba-fffbdf01fa6a74e6da70815607a1c22b9b6ebcdb.tar.bz2 samba-fffbdf01fa6a74e6da70815607a1c22b9b6ebcdb.zip |
selftest: Output error when samba_tool user command fails
It should help to debug why is it failing on some hosts in the build
farm (ie. sn-devel)
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | python/samba/tests/samba_tool/user.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/samba/tests/samba_tool/user.py b/python/samba/tests/samba_tool/user.py index 33344cd3d3..89fa22b812 100644 --- a/python/samba/tests/samba_tool/user.py +++ b/python/samba/tests/samba_tool/user.py @@ -232,7 +232,8 @@ class UserCmdTestCase(SambaToolCmdTest): "-H", "ldap://%s" % os.environ["DC_SERVER"], "-U%s%%%s" % (os.environ["DC_USERNAME"], os.environ["DC_PASSWORD"])) - self.assertCmdSuccess(result) + msg = "command should return %s" % err + self.assertCmdSuccess(result, msg) self.assertEquals(err,"","Shouldn't be any error messages") self.assertIn("User '%s' created successfully" % user["name"], out) @@ -261,7 +262,8 @@ class UserCmdTestCase(SambaToolCmdTest): "-H", "ldap://%s" % os.environ["DC_SERVER"], "-U%s%%%s" % (os.environ["DC_USERNAME"], os.environ["DC_PASSWORD"])) - self.assertCmdSuccess(result) + msg = "command should return %s" % err + self.assertCmdSuccess(result, msg) self.assertEquals(err,"","Shouldn't be any error messages") self.assertIn("User '%s' created successfully" % user["name"], out) |