Mattermost is increasing the unit test coverage for the mmctl CLI tool. Through the use of a mocked client that will simulate the interactions with the server, the goal is to create a suite of tests that check the tool's behavior in a flexible and robust way.
This Help Wanted issue covers the addition of unit tests to the ShowRoleCmd command, in the commands/permissions.go file. The expected way to add these tests is to create a test function in the commands/permissions_test.go file and add one s.Run block for each possible test case.
For more information on how to add a unit test to mmctl, take a look at the campaign blogpost: https://developers.mattermost.com/blog/unit-testing-mmctl-commands/
Example: mattermost/mmctl#37
If you have questions about the ticket or you need any help, feel free to post your question in the community CLI channel or contact miguel.delacruz in https://community.mattermost.com/.
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.
May I have a shot on this? :slightly_smiling_face:
Most helpful comment
May I have a shot on this? :slightly_smiling_face: