From dd3d863e48e38cb3d6b65af036af9b3161a5d0fc Mon Sep 17 00:00:00 2001 From: Alce Ops Date: Fri, 1 May 2026 05:55:57 -0400 Subject: [PATCH] test: harden local bot create permission check --- server/cmd/mmctl/commands/bot_e2e_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()) })