vendredi 11 septembre 2020

Go Test Coverage, over different packages

I have been writing an rest service I have the following structure

/controllers
/domain/dao
/services

after writing a lot of tests for each individual package with mocks for each stage, I thought it would be quicker to just write tests against the controller and mock the database, so in that I know the /domain/dao layer is being called.

My problem now is when I run code coverage I do not get the coverage for my /service or the /domain/dao even though I know the code is being called

Any ideas on how to get my code coverage on all files?

Aucun commentaire:

Enregistrer un commentaire