[MM-47821]: fix searchUserCmdF to return proper errors (#24700)
* fix: fix searchUserCmdF to return proper errors * fix: fix broken tests * fix: fix go-ci issues * fix: fix more broken tests * fix: fix wrong function call on error getting user test * fix: fix e2e test --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -134,7 +134,7 @@ func (s *MmctlE2ETestSuite) TestSearchUserCmd() {
|
||||
emailArg := "nonexistentUser@example.com"
|
||||
|
||||
err := searchUserCmdF(c, &cobra.Command{}, []string{emailArg})
|
||||
s.Require().Nil(err)
|
||||
s.Require().Error(err)
|
||||
s.Len(printer.GetLines(), 0)
|
||||
s.Len(printer.GetErrorLines(), 1)
|
||||
s.Equal(fmt.Sprintf("1 error occurred:\n\t* user %s not found\n\n", emailArg), printer.GetErrorLines()[0])
|
||||
|
||||
Ссылка в новой задаче
Block a user