[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
@@ -27,7 +27,7 @@ func (s *MmctlE2ETestSuite) TestImportUploadCmdF() {
|
||||
|
||||
err := importUploadCmdF(s.th.Client, &cobra.Command{}, []string{importFilePath})
|
||||
s.Require().NotNil(err)
|
||||
s.Require().Equal("failed to create upload session: : You do not have the appropriate permissions.", err.Error())
|
||||
s.Require().Equal("failed to create upload session: 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) TestImportProcessCmdF() {
|
||||
|
||||
err := importProcessCmdF(s.th.Client, &cobra.Command{}, []string{"importName"})
|
||||
s.Require().NotNil(err)
|
||||
s.Require().Equal("failed to create import process job: : You do not have the appropriate permissions.", err.Error())
|
||||
s.Require().Equal("failed to create import process job: You do not have the appropriate permissions.", err.Error())
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
@@ -138,7 +138,7 @@ func (s *MmctlE2ETestSuite) TestImportListAvailableCmdF() {
|
||||
|
||||
err := importListAvailableCmdF(s.th.Client, &cobra.Command{}, nil)
|
||||
s.Require().NotNil(err)
|
||||
s.Require().ErrorContains(err, "failed to list imports: : You do not have the appropriate permissions.")
|
||||
s.Require().ErrorContains(err, "failed to list imports: You do not have the appropriate permissions.")
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
@@ -268,7 +268,7 @@ func (s *MmctlE2ETestSuite) TestImportJobShowCmdF() {
|
||||
|
||||
err := importJobShowCmdF(s.th.Client, &cobra.Command{}, []string{job1.Id})
|
||||
s.Require().NotNil(err)
|
||||
s.Require().ErrorContains(err, "failed to get import job: : You do not have the appropriate permissions.")
|
||||
s.Require().ErrorContains(err, "failed to get import job: You do not have the appropriate permissions.")
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
@@ -278,7 +278,7 @@ func (s *MmctlE2ETestSuite) TestImportJobShowCmdF() {
|
||||
|
||||
err := importJobShowCmdF(c, &cobra.Command{}, []string{model.NewId()})
|
||||
s.Require().NotNil(err)
|
||||
s.Require().ErrorContains(err, "failed to get import job: : Unable to get the job.")
|
||||
s.Require().ErrorContains(err, "failed to get import job: Unable to get the job.")
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
@@ -307,7 +307,7 @@ func (s *MmctlE2ETestSuite) TestImportJobListCmdF() {
|
||||
|
||||
err := importJobListCmdF(s.th.Client, cmd, nil)
|
||||
s.Require().NotNil(err)
|
||||
s.Require().ErrorContains(err, "failed to get jobs: : You do not have the appropriate permissions.")
|
||||
s.Require().ErrorContains(err, "failed to get jobs: You do not have the appropriate permissions.")
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
|
||||
Ссылка в новой задаче
Block a user