[email/backend] Switch to using (node-based) hoodiecrow fake IMAP/SMTP servers from Thunder fake-servers

RESOLVED FIXED

Status

Firefox OS
Gaia::E-Mail
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: asuth, Assigned: mcav)

Tracking

({feature})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
We currently use fake IMAP and SMTP servers derived from the Thunderbird fake-servers.  (Specifically, they're the same with a few minor changes.)  We want to switch to using Andris Reinman's hoodiecrow fake IMAP server https://github.com/andris9/hoodiecrow for reasons of:

- it's full featured and very cleanly extensible
- it's friends with the email.js libraries that we are switching to as part of bug 885110
- it runs in node.js which potentially simplifies its use in testing frameworks/etc.

The current plan is to consider the switch to using this as part of bug 885110.  Mainly we would do that if either:
- bug 885110 turns out to be really easy 
- bug 885110 is turning out to be hard and the current IMAP fake-server is part of the problem and the fixes are not trivial.
feature-b2g: --- → 2.1
Keywords: feature

Updated

3 years ago
QA Whiteboard: [COM=Productivity]

Updated

3 years ago
QA Whiteboard: [COM=Productivity] → [COM=Gaia::E-Mail]
Target Milestone: --- → 2.1 S3 (29aug)
feature-b2g: 2.1 → ---
Target Milestone: 2.1 S3 (29aug) → ---
(Assignee)

Updated

2 years ago
Assignee: nobody → m
(Assignee)

Comment 1

2 years ago
Created attachment 8584683 [details] [review]
Mail-fakeservers PR

Comment 2

2 years ago
Created attachment 8584716 [details] [review]
[gaia-email-libs-and-more] mcav:hoodiecrow > mozilla-b2g:master
(Assignee)

Comment 3

2 years ago
The GELAM bits are based on top of my test framework patch, though in retrospect, the GELAM changes are minimal enough that it probably wouldn't have to be that way. If desired, I could rework that so that they aren't dependent.

Two fixes to hoodiecrow were needed: one regex patch (which you saw on IRC), and one bugfix to make it always return "UID" in response to "UID FETCH". The former has already been merged into hoodiecrow master and referenced in package.json; the latter has not yet been merged, and would need to be pulled from https://github.com/andris9/hoodiecrow/pull/13 to make all the tests pass. Getting that in would be a prerequisite to landing.

One GELAM test needed a tweak (as discussed on IRC, and visible in the GELAM commit) to avoid timezone problems, but the rest pass largely without modification.
(Assignee)

Comment 4

2 years ago
Comment on attachment 8584683 [details] [review]
Mail-fakeservers PR

(Patch notes in separate bugzilla comment. The GELAM PR can probably be ignored for now, pending whether or not we want to merge the test framework changes first, as noted in my previous comment.)
Attachment #8584683 - Flags: review?(bugmail)
(Assignee)

Comment 5

2 years ago
I have since merged the second andris9/hoodiecrow patch and updated package.json in mail-fakeservers.
(Reporter)

Comment 6

2 years ago
Comment on attachment 8584683 [details] [review]
Mail-fakeservers PR

It's pretty cool that we can keep around the old fake-servers for now too!
Attachment #8584683 - Flags: review?(bugmail) → review+
(Reporter)

Updated

2 years ago
Attachment #8584716 - Flags: review+
(Assignee)

Comment 7

2 years ago
gelam: https://github.com/mozilla-b2g/gaia-email-libs-and-more/commit/916730a88eff66f36d9ebb7f6281a64c436bac19

Gaia changes are inconsequential and do not need to be merged.

Mail-fakeservers released with v0.0.39: https://github.com/mozilla-b2g/mail-fakeservers/commit/02fcdaf9b1ca72b0c08932186c10e36379b4ab8e
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.