mirror of
https://github.com/samba-team/samba.git
synced 2025-12-20 16:23:51 +03:00
cmdline: samba-tool test for bad option warning
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
This commit is contained in:
committed by
Douglas Bagnall
parent
ef0068cd2c
commit
d2b119e34b
@@ -79,3 +79,12 @@ class HelpTestCase(SambaToolCmdTest):
|
||||
known_commands = new_commands
|
||||
|
||||
self.assertEqual(failed_commands, [])
|
||||
|
||||
def test_bad_password_option(self):
|
||||
"""Do we get a warning with an invalid --pass option?"""
|
||||
(result, out, err) = self.run_command(["samba-tool",
|
||||
"processes",
|
||||
"--pass-the-salt-please",
|
||||
"pleeease"])
|
||||
self.assertIn("if '--pass-the-salt-please' is not misspelt", err)
|
||||
self.assertIn("the appropriate list in is_password_option", err)
|
||||
|
||||
Reference in New Issue
Block a user