Mattermost Server: 5.16.1
1. Create a user via the CLI: mattermost user create —email email@example.com —username devopsbot —password badpassword
2. Convert that user to a bot: mattermost user convert devopsbot —bot
3. Delete the user with mattermost user delete devopsbot
After 2: User is converted to a bot and a corresponding access token is generated and output to the command line.
After 3: User is deleted
After 2: The user is converted successfully, but there is no corresponding token in the UserAccessTokens table and it isn’t output to the CLI. When creating a bot account through the web interface. Also, since bot users can’t log in, the user can’t create a user access token to use.
After 3: CLI enters a loop. With SQL trace enabled, this message repeats until the process is killed with Ctrl+C