I have an application which consists of a few microservices. For example:
- Authnenticate service
- Messanger service.
To auth I use JWT. If I want to test API in "Messanger service" first I have to get JWT from "Authnenticate service". But send request to production "Authnenticate service" it's bad idea (I think so).
I see a few solutions:
- Use "hardcode" JWT in my unittest.
- Turn off auth check in my api for unittests.
How do you make unittests in that case?
Aucun commentaire:
Enregistrer un commentaire