-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Test message rendering #9460
Test message rendering #9460
Conversation
825c1a3
to
0ceb1e8
Compare
0ceb1e8
to
8f34373
Compare
Sorry, it took me a moment to wrestle with phpstan, the cs-fixer and windows filename problems. It's ready now and I won't force-push anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Actually this conflicts with the work I did for #9465 (which only occured to me yesterday), so I'd not push this before that other topic was discussed. |
4c0b172
to
0a5f089
Compare
0a5f089
to
63c90ef
Compare
1 similar comment
63c90ef
to
2eef5c3
Compare
We can't test this code if it exits.
Run ./tests/MessageRendering/run-tests.sh to run all tests in that directory, which are supposed to check the rendering of concrete messages. The messages are served by a dovecot container from the Maildir in `tests/MessageRendering/src/maildir` and identified by their `Message-Id`.
1359579
to
13fefcc
Compare
I cleaned this up, integrated the greenmail IMAP server (containerized) and hooked it into the github workflows. Hope it's agreeable this way. I want to use this kind of tests to work on #9565 and #9585, thus would like to merge it soon. I wouldn't integrate the rendering tests in the unit test suite, because they would slow that suite down: Currently 1186 unit tests take roughly as long as 4 message rendering tests (both executed via docker compose). The message rendering tests are also more integration tests than unit tests, so it doesn't fit too well anyway. |
This adds an integration testing setup to check the rendering of individual emails. The idea is to grow this with a lot of "normal" and "interesting" messages, to have a solid base for fixing new rendering errors without breaking previous fixes (motivated by #9443). It would also help with possible refactoring.
Run ./tests/MessageRendering/run-tests.sh to run all tests in that directory. They are ignored when running the main test suite (for now).
The messages are served by a dovecot container from the Maildir in
tests/MessageRendering/src/maildir
and identified by theirMessage-Id
. This way one can drop a raw email into there, and immediately write a test against it.This is not yet built into the GitHub workflows, and also has only a few messages and tests, because before putting more work into this I'd like to have some feedback.
@roundcube/webmail-developers What do you think about this?