[MM-62179] Fix: mmctl debug error when setting email (#29953)

* only GetUserByEmail if arg is an email

* fixing tests

* fix typo
Этот коммит содержится в:
Christopher Poile
2025-01-29 17:45:11 -05:00
коммит произвёл GitHub
родитель 05ca61c784
Коммит 28c561d643
10 изменённых файлов: 31 добавлений и 378 удалений

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

@@ -18,11 +18,6 @@ func (s *MmctlUnitTestSuite) TestGetUserFromArgs() {
notFoundEmail := "emailNotfound@notfound.com"
notFoundErr := errors.New("user not found")
printer.Clean()
s.client.
EXPECT().
GetUserByEmail(context.TODO(), notFoundEmail, "").
Return(nil, &model.Response{StatusCode: http.StatusNotFound}, notFoundErr).
Times(1)
s.client.
EXPECT().
GetUserByUsername(context.TODO(), notFoundEmail, "").