Skip to content
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

Consider adding mode to test error handling #124

Open
nbaksalyar opened this issue Mar 23, 2016 · 2 comments
Open

Consider adding mode to test error handling #124

nbaksalyar opened this issue Mar 23, 2016 · 2 comments

Comments

@nbaksalyar
Copy link

It would be nice if GreenMail had an option to explicitly define error responses to test error handling in user's code.

For example check MailHog, a fake SMTP server. It has a special mode to randomly reject connections, authentications, etc.

Another good example is Netflix's Chaos Monkey that is used to test distributed systems.

@marcelmay
Copy link
Member

Thanks for the input.

We have something like this planned in #40 - where you can define event rules.
Do you have any concrete error cases in mind?

@nbaksalyar
Copy link
Author

Do you have any concrete error cases in mind?

I guess cases available in MailHog would be a good start:

  1. Reject connections (a socket exception);
  2. Reject authentication;
  3. Reject recipients (SMTPAddressFailedException);
  4. Reject senders (SMTPSenderFailedException).

These should cover most of the basic SMTP errors.
I'm not sure about IMAP, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants