-
Notifications
You must be signed in to change notification settings - Fork 36
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
Can't mock logger anymore #444
Comments
Is there any more context? are tests failing? Any specific place where we need to mock a logger? |
As a solution, we can do in var NewLogger = log.New then we will be able to mock it in the tests. What do you think @carlosms ? |
It looks risk... but we can go that way to unblock the issue and maybe rethink later if we find a better solution. Can't we change the |
Sadly we can not. LoggerFactory isn't an interface but a struct defined in go-log. And there is no way to replace logrus in I'll proceed with the solution from above to unblock related PR but keep this issue open because I don't like this solution too much. |
After #439 it's impossible to mock logger in tests anymore.
The text was updated successfully, but these errors were encountered: