Add email logging and SMTP health check
- Add structured logging for email sending (success/failure) - Add HealthCheck method to EmailService interface - Extend /health endpoint to include SMTP status - Update all email service mocks to implement HealthCheck - SMTP status shows: ok, error, or disabled
This commit is contained in:
@@ -85,6 +85,10 @@ func (m *mockRequestResetEmailService) Send(message services.EmailMessage) error
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *mockRequestResetEmailService) HealthCheck() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestRequestPasswordResetHandler_Success(t *testing.T) {
|
||||
user := entities.NewUser("test@example.com", "hash")
|
||||
user.ID = "user-123"
|
||||
|
||||
Reference in New Issue
Block a user