diff --git a/server/cmd/mmctl/commands/bot_e2e_test.go b/server/cmd/mmctl/commands/bot_e2e_test.go index 1ed8fcb34e4..7483ab1b9b5 100644 --- a/server/cmd/mmctl/commands/bot_e2e_test.go +++ b/server/cmd/mmctl/commands/bot_e2e_test.go @@ -407,8 +407,10 @@ func (s *MmctlE2ETestSuite) TestBotCreateCmdF() { cmd := &cobra.Command{} cmd.Flags().Bool("with-token", true, "") - err := botCreateCmdF(s.th.Client, cmd, []string{"testbot"}) + username := model.NewUsername() + err := botCreateCmdF(s.th.Client, cmd, []string{username}) s.Require().Error(err) + s.Require().Contains(err.Error(), "permissions") s.Require().Empty(printer.GetLines()) s.Require().Empty(printer.GetErrorLines()) })