test: harden local bot create permission check

This commit is contained in:
Alce Ops 2026-05-01 05:55:57 -04:00
parent 41761eed55
commit dd3d863e48

View file

@ -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())
})