For the signups we test till the database entry and set a flag to not send a email to avoid spamming emails for no reason we only test logic that belongs to the api.
The flag is interpreted by the MongoDB trigger to not fire a event for health checks.
This needs to be set once this is in production in the MongoDB trigger for the SignupServices above: {"updateDescription.updatedFields.sendEmail":true}
It can't right now since the data model on production doesn't set the sendEmail flag yet only after this pull request.
Testing:
npm i
npx tsc
GET http://localhost:3000/health
Sidenote:
We need the same logic as automated tests once we push / pullrequest / after build and before deployment.
Health checking:
For the signups we test till the database entry and set a flag to not send a email to avoid spamming emails for no reason we only test logic that belongs to the api. The flag is interpreted by the MongoDB trigger to not fire a event for health checks. This needs to be set once this is in production in the MongoDB trigger for the SignupServices above:
{"updateDescription.updatedFields.sendEmail":true}
It can't right now since the data model on production doesn't set the sendEmail flag yet only after this pull request.Testing:
Sidenote: We need the same logic as automated tests once we push / pullrequest / after build and before deployment.