summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-05-10 12:59:59 +1200
committerAndrew Bartlett <abartlet@samba.org>2022-05-10 23:05:31 +0000
commit9b0f25ec498a318111a5f4fdbba3e1ce82bc0124 (patch)
tree25894e689be39d6c2504365a1710e44aa5a506a2 /python
parentc87ec2d331521569a88bfdbfabd936187963c822 (diff)
downloadsamba-9b0f25ec498a318111a5f4fdbba3e1ce82bc0124.tar.gz
samba-9b0f25ec498a318111a5f4fdbba3e1ce82bc0124.tar.bz2
samba-9b0f25ec498a318111a5f4fdbba3e1ce82bc0124.zip
tests/samba-tool user_wdigest: Check command results
Ensure that the commands to create and delete the user execute successfully. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/samba_tool/user_wdigest.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/python/samba/tests/samba_tool/user_wdigest.py b/python/samba/tests/samba_tool/user_wdigest.py
index 0d03b51fe3d..874de0d3814 100644
--- a/python/samba/tests/samba_tool/user_wdigest.py
+++ b/python/samba/tests/samba_tool/user_wdigest.py
@@ -61,14 +61,22 @@ class UserCmdWdigestTestCase(SambaToolCmdTest):
attrs=["nETBIOSName"])
self.netbios_domain = str(res[0]["nETBIOSName"][0])
self.password = self.random_password()
- self.runsubcmd("user",
- "create",
- USER_NAME,
- self.password)
+ result, out, err = self.runsubcmd("user",
+ "create",
+ USER_NAME,
+ self.password)
+ self.assertCmdSuccess(result,
+ out,
+ err,
+ "Ensure user is created")
def tearDown(self):
super(UserCmdWdigestTestCase, self).tearDown()
- self.runsubcmd("user", "delete", USER_NAME)
+ result, out, err = self.runsubcmd("user", "delete", USER_NAME)
+ self.assertCmdSuccess(result,
+ out,
+ err,
+ "Ensure user is deleted")
def _testWDigest(self, attribute, expected, missing=False):