Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use github.com/stretchr/testify/mock for unit tests #3

Closed
levb opened this issue Nov 13, 2019 · 1 comment · Fixed by #2
Closed

Use github.com/stretchr/testify/mock for unit tests #3

levb opened this issue Nov 13, 2019 · 1 comment · Fixed by #2
Assignees
Labels
Difficulty/2:Medium Medium ticket Help Wanted Community help wanted Tech/Go

Comments

@levb
Copy link
Contributor

levb commented Nov 13, 2019

The recommended best practice at Mattermost is to use github.com/stretchr/testify/mock to mock interfaces in unit tests. In other plugins, like Jira, we had been constrained by the flat plugin package layout, and the existing data structures made it difficult to break it into subpackages.

This plugin was set up to avoid these issues, and the functionality is more carefully packaged, so using github.com/stretchr/testify/mock should be easy(-er).

@levb levb added Enhancement Difficulty/2:Medium Medium ticket Help Wanted Community help wanted Tech/Go Up For Grabs Ready for help from the community. Removed when someone volunteers labels Nov 13, 2019
@cpurta
Copy link
Contributor

cpurta commented Nov 13, 2019

@levb I am currently addressing this issue in #2

@levb levb removed the Up For Grabs Ready for help from the community. Removed when someone volunteers label Nov 13, 2019
@levb levb closed this as completed in #2 Nov 21, 2019
mickmister pushed a commit that referenced this issue Mar 22, 2023
…a single user" by added additional logging (#245)

* [MI-2664]:Fixed issue #244 on ms calender to add additional logging (#2)

* [MI-2664]:Fixed issue #244 on ms calender to add additional logging

* [MI-2664]:Added comment for skipping user

* [MI-2664]:Fixed unit test cases

* [MI-2664]:Fix lint errors

* [MI-2664]:Added conditional logging

* [MI-2664]:Added constants for limit

* [MI-2664]:Fixed review comments

* [MI-2664]:Fixed review comments

* [MI-2687]:Fixed review comments given by mattermost team on issue#244 of mscalender plugin (#3)

* [MI-2687]:Fixed review comments given by mattermost team on issue #244 of mscalender plugin

* [MI-2687]:Fixed unit test cases

* [MI-2687]:Fixed review fixes

* [MI-2705]:Added summary for status sync job (#4)

* [MI-2705]:Added summary for status sync job

* [MI-2705]:Fixed review comments

* Fixed lint errors (#243)

* [MI-2705]:Fixed review comments

* [MI-2705]:Fixed review comments

---------

Co-authored-by: Manoj Malik <manoj@brightscout.com>

* [MM-244]:Fixed lint errors

* [MM-244]:Added a check for summary to be nill

* [MM-244]:Added addtional check for user error

* [MM-244]:Fixed lint errors

* [MM-244]:Fixed review comments

---------

Co-authored-by: Manoj Malik <manoj@brightscout.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty/2:Medium Medium ticket Help Wanted Community help wanted Tech/Go
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants