[MM-64663] Fix potential panic in mmctl ldap job show command (#32575)

* Fix potential panic in `mmctl ldap job show` command

* fix examples and docs

---------

Co-authored-by: Christopher Poile <cpoile@gmail.com>
Этот коммит содержится в:
Claudio Costa
2025-07-04 07:48:17 -06:00
коммит произвёл GitHub
родитель 10b6784968
Коммит 4a7aeae861
6 изменённых файлов: 23 добавлений и 8 удалений

Просмотреть файл

@@ -213,6 +213,15 @@ func (s *MmctlE2ETestSuite) TestLdapJobShowCmdF() {
s.Require().Empty(printer.GetErrorLines())
})
s.RunForSystemAdminAndLocal("no args", func(c client.Client) {
printer.Clean()
err := ldapJobShowCmdF(c, &cobra.Command{}, []string{})
s.Require().EqualError(err, "expected at least one argument (ldapJobID). See help text for details")
s.Require().Empty(printer.GetLines())
s.Require().Empty(printer.GetErrorLines())
})
s.RunForSystemAdminAndLocal("not found", func(c client.Client) {
printer.Clean()