-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make log mailer for testing #5893
Make log mailer for testing #5893
Conversation
Signed-off-by: Andrew Thornton <[email protected]>
This ensures that the sending mail process works Signed-off-by: Andrew Thornton <[email protected]>
Shortened log after cherry-picking this and placing it on releases/v1.7:
Revealing immediately the bug described in #5891 |
Codecov Report
@@ Coverage Diff @@
## master #5893 +/- ##
==========================================
+ Coverage 37.98% 38.22% +0.24%
==========================================
Files 329 329
Lines 48406 48423 +17
==========================================
+ Hits 18385 18508 +123
+ Misses 27379 27249 -130
- Partials 2642 2666 +24
Continue to review full report at Codecov.
|
I would prefer that inbucket service would be added to drone builds and that be used as SMTP server. Than no new fake tyoe would not be needed and later we could use it's api to check if message is actually sent |
Ok, I can understand that. I did wonder if we should make an internal channeled debug mailer myself - one that would just create a list of mail objects sent so you could query it in integration tests. There may still be a point to having this sort of log mailer though. You can have it set on your development machine and test what is going to come out of Gitea without having to set up other servers. (Although you can kind of do this with the sendmail interface this would be built in unless we wanted to provide an appropriate sendmail proxy script.) In any case, the point was to spur us to sort this out. We went live with a fairly major version and server 500s happened as soon as people turned on email notifications. |
Maybe we should name it |
This PR looks great! I'm happy to give my 👍, but I like @lunny's idea of changing the name to |
Hi @techknowlogick Have changed it to |
Multiple users have noticed in problems in 1.7.0 with issues to do with sending email. This is because there are code paths to do with emailing that are not tested in the integrations test due to gitea requiring a valid email configuration.
This PR creates a simple log mailer that can be used to test what kind of emails gitea would send.
Of note cherry-picking this and placing it on the v1.7 release master reveals the underlying bug in #5891.