Closed Bug 533314 Opened 15 years ago Closed 11 years ago

Tests: Use foo@foo.invalid instead of foo@invalid.com

Categories

(MailNews Core :: Testing Infrastructure, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 21.0

People

(Reporter: BenB, Assigned: aryx)

Details

Attachments

(1 file, 4 obsolete files)

test_bug474774.js and many many others:

Actual:
const kSender = "from@invalid.com";
const kTo = "to@invalid.com";

Expected:
const kTo = "to@foo.invalid";

Reason:
RFC 2606
Assignee: bugzilla → nobody
Keywords: helpwanted
Whiteboard: [good first bug]
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → wesongathedeveloper
Status: NEW → ASSIGNED
Attachment #417417 - Flags: review?(dmose)
While the changes in this patch _look_ right from reading them, they don't actually apply because the original .eml files in mercurial have DOS line endings ("/r/n"), and this patch itself does not.  It's not exactly clear to me how the problem got introduced here.  It could be the fault of the OS you're running on, Mercurial, or maybe even the editor (though that less seems less likely).  Saint Wesonga, would you try to figure out how to generate a patch that doesn't have that problem?

The .eml files in Mercurial contain the text "this email is in dos format because that is what the interface requires", which appears to have originated when Standard8 originally checked the first version of CVS.  Standard8, do you know you exactly what "the interface" is referring to?
Attachment #417417 - Flags: review?(dmose) → review-
(In reply to comment #2)
> The .eml files in Mercurial contain the text "this email is in dos format
> because that is what the interface requires", which appears to have originated
> when Standard8 originally checked the first version of CVS.  Standard8, do you
> know you exactly what "the interface" is referring to?

"The interfaces" is more referring to the format we typically store and process our emails in - which is the dos format, even on non-dos type platforms.
Say "data format" and "wire line-endings" (CR LF, see RFC 2821), and it's logical why that's expected.
(Another way would of course be to let the testsuite adapt the lineendings from platform to wire, but that'd be offtopic here.)
I could be wrong, but I believe the issue here is that mail servers (pop3, imap) are supposed to return CRLF terminated lines, and since our fake servers don't guarantee that, it's just easier if we give them CRLF terminated messages to being with.
Why is this in composition component?

Saint Wesonga, are you going to finish this patch?
Flags: needinfo?(wesongathedeveloper)
Status: ASSIGNED → NEW
Assignee: wesongathedeveloper → nobody
Assignee: nobody → acelists
Severity: trivial → minor
Component: Composition → Testing Infrastructure
Flags: needinfo?(wesongathedeveloper)
Version: 1.9.1 Branch → Trunk
Aryx, maybe this would be some relaxing for you :)
Assignee: acelists → archaeopteryx
To complete the patch, I need to know how to edit mailnews/extensions/bayesian-spam-filter/test/unit/msgCorpus.dat (a renamed training.dat with junk filter training data).
Flags: needinfo?(kent)
Changing that is not trivial. It was generated from a real test message that I sent to myself.

Why do you need to change it? There is no invalid.com there. yes hostmonster.com and caspia.com, but these are only used as text strings in this test.
Flags: needinfo?(kent)
Comment on attachment 697401 [details] [diff] [review]
make used mail addresses invalid, new patch v1

Sorry for the delay, looks good. There's a little bit of bitrot that'll need to be fixed before checkin.
Attachment #697401 - Flags: review?(mbanner) → review+
Whiteboard: [good first bug] → [check in to comm-central]
This doesn't apply cleanly (yeah, I know). Please rebase (and don't forget to qref!).
Keywords: checkin-needed
Sorry for the confusion.

TL;DR: Fixed in this patch.

Extended version: I hadn't qref-ed when uploading the patch for review, leaving out two fixes without two tests fail. After uploading, I discovered a file size discrepancies between the new and an old export of the patch and I didn't correct that properly in the patch submitted earlier.
Attachment #711368 - Attachment is obsolete: true
https://hg.mozilla.org/comm-central/rev/af56cbb73657
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [check in to comm-central]
Target Milestone: --- → Thunderbird 21.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: