[MM-56061] Only render where field in model.AppError when it's present (#25648)
* Only render where field in model.AppError when it's present * Remove trailing comma from permission error
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a54f927e3d
Коммит
5b6b425cfc
@@ -31,7 +31,7 @@ func (s *MmctlE2ETestSuite) TestExtractRunCmdF() {
|
||||
|
||||
err := extractRunCmdF(s.th.Client, cmd, []string{})
|
||||
s.Require().NotNil(err)
|
||||
s.Require().Equal("failed to create content extraction job: : You do not have the appropriate permissions.", err.Error())
|
||||
s.Require().Equal("failed to create content extraction job: You do not have the appropriate permissions.", err.Error())
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
@@ -88,7 +88,7 @@ func (s *MmctlE2ETestSuite) TestExtractJobShowCmdF() {
|
||||
|
||||
err := extractJobShowCmdF(s.th.Client, &cobra.Command{}, []string{job1.Id})
|
||||
s.Require().NotNil(err)
|
||||
s.Require().Equal("failed to get content extraction job: : You do not have the appropriate permissions.", err.Error())
|
||||
s.Require().Equal("failed to get content extraction job: You do not have the appropriate permissions.", err.Error())
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
@@ -98,7 +98,7 @@ func (s *MmctlE2ETestSuite) TestExtractJobShowCmdF() {
|
||||
|
||||
err := extractJobShowCmdF(c, &cobra.Command{}, []string{model.NewId()})
|
||||
s.Require().NotNil(err)
|
||||
s.Require().ErrorContains(err, "failed to get content extraction job: : Unable to get the job.")
|
||||
s.Require().ErrorContains(err, "failed to get content extraction job: Unable to get the job.")
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
@@ -127,7 +127,7 @@ func (s *MmctlE2ETestSuite) TestExtractJobListCmdF() {
|
||||
|
||||
err := extractJobListCmdF(s.th.Client, cmd, nil)
|
||||
s.Require().NotNil(err)
|
||||
s.Require().Equal("failed to get jobs: : You do not have the appropriate permissions.", err.Error())
|
||||
s.Require().Equal("failed to get jobs: You do not have the appropriate permissions.", err.Error())
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
|
||||
Ссылка в новой задаче
Block a user