Mattermost-server: Add unit tests to the "ShowRoleCmd" mmctl command

Created on 15 Dec 2019  路  1Comment  路  Source: mattermost/mattermost-server

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.

JIRA: https://mattermost.atlassian.net/browse/MM-20290

AreCLI AreTechnical Debt Aremmctl Medium Help Wanted PR Exists TecGo

Most helpful comment

May I have a shot on this? :slightly_smiling_face:

>All comments

May I have a shot on this? :slightly_smiling_face:

Was this page helpful?
0 / 5 - 0 ratings