Week 7 of GSoC ‘16: Mailhandler updates
The coding period of Google Summer of Code 2016 has been continued after midterm evaluation. After splitting the Mailhandler analyzer into more specific and independent analyzers for different parts of an email message (sender, entity type, PGP, body, footer), last week I was working on providing test coverage for those.
The current tests are mostly written as kernel tests because of their speed of execution.
MailhandlerNodeTest represents an integration test for the node handler and tests the whole process of Inmail analyzers and handlers.
Newly written tests:
SenderAnalyzerKernelTest- covers the use case when a user is identified and when a user is not identified
PGPAnalyzerKernelTest- tests assertions of PGP-signed messages which inlude body, sender etc
FooterAnalyzerKernelTesttests plain mail messages with and without the message footer
EntityTypeAnalyzerKernelTestcovers entity type and bundle pair of the mail subject.
SenderAnalyzerKernelTestcovers the mail sender detection using
Frommail header field.
As they were all similar in the implementation,
AnalyzerTestBase was added. It contains the list of required enabled modules and set up configuration for easier analyzer-specific work.
Regarding the web tests, I extended
MailhandlerWebTest with "Manage display" assertions of GPG key field which can be displayed via the public key, GPG key's fingerprint or as both properties.
As previously mentioned I created a few inmail issues which will allow for a better DX. Here is a short update on status of those issues:
Lack of standard result in collaboration of analyzers has already a patch provided and it is in the late phase of discussion. I have received the review for the first patch and will work on a new version to support context classes.
Support switching the user context is currently postponed because of the dependent issue. The patch is already uploaded and it will need to be slightly modified as soon as Lack of standard result in collaboration of analyzers is committed.
Send processing report as reply is in the discussion status too. After today’s meeting with mentors, we discussed how we can approach the topic and I have more clear steps to proceed.
The plan for the next week seems quite interesting. Besides the mentioned Inmail issues, I will be working on adding support for creating comments by sending an email. All analyzers implemented in the previous week will be used as a part of new comment handler. I am looking forward to enriching Mailhandler with one more feature.