1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +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:
Douglas Bagnall 2024-07-05 16:13:04 +12:00 committed by Douglas Bagnall
parent ef0068cd2c
commit d2b119e34b
2 changed files with 11 additions and 0 deletions

View File

@ -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)

View File

@ -0,0 +1,2 @@
^samba.tests.samba_tool.help.samba.tests.samba_tool.help.HelpTestCase.test_bad_password_option