Week 7 of GSoC ‘16: Mailhandler updates

Submitted by Milos on Wed, 07/06/2016 - 19:47

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
  • FooterAnalyzerKernelTest tests plain mail messages with and without the message footer
  • EntityTypeAnalyzerKernelTestcovers entity type and bundle pair of the mail subject.
  • SenderAnalyzerKernelTest covers the mail sender detection using From mail 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:

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.

 

 

Add new comment