[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>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
10b6784968
Коммит
4a7aeae861
@@ -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()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user