Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
simpletest.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Nov 2015 at 22:36 UTC
Updated:
15 Mar 2016 at 09:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
isntall commentedI was testing out the new containers that don't use phpenv and this issue still showed up.
Comment #3
elachlan commentedCould you attach the console output around the failure from docker?
Comment #4
elachlan commentedOutput I found in one of the error logs:
Comment #5
elachlan commentedThis is from a different test. It is close to the output in the previous test.
Comment #6
elachlan commentedHas the following:
Comment #7
MixologicThis is very likely related to the following:
http://axiac.ro/blog/2013/06/sh-1-t-not-found/
A quick look inside one of the containers shows the following:
So the next question is, what, from inside of the testrunners, is trying to send mail, but only sometimes?
Comment #8
alexpottThis is caused by
Drupal\migrate_drupal\Tests\d6\EntityContentBaseTest- it is a KernelTestBase test.Comment #9
elachlan commented"sh: 1: -t: not found" was not found in the test output! :)
Comment #10
MixologicNice find Alex. Looks like we see it on occasion whenever something inadvertently sends mail.
Also, slightly disturbing that sendmail_path is essentially a shell vector. Yet another reason one should never allow their webserver process to have too many permissions.
Comment #11
dawehner+1 to always use the test mail collector, its what you always want. In case you want something else, you can still switch over.
I guess the odd message is not visible on the old testbase, because you have a different error handler?
Comment #13
elachlan commentedPatch is now back to green.
Comment #14
alexpottWe still need tests for this in both KernelTestBaseTests
Comment #15
mile23Maybe a duplicate of #2146971: SimpleTest should override all mail system implementations with TestMailCollector
Comment #16
jhedstromThis combines #2675202: Add an AssertMailTrait to allow mail testing in Kernel tests as suggested there. With this, then all tests that choose to use the new trait will be able to assert email results. Setting NR, although tests are still needed.
Comment #17
alexpottAdded a test and fixed some coding standards. I don't think the deprecated KernelTestBase should be tested because there is massive work on to remove all the usages of this.
Comment #18
alexpottWebTestBase has existing test coverage in Drupal\simpletest\Tests\MailCaptureTest... the test added here is a verbatim copy of that and just a couple of changes for phpunit style assertions.
Comment #19
alexpottComment #20
dawehnerNice work!
Is there some real value in the sprintf here?
these docs still refer to the old function names.
Comment #21
alexpottthanks for the review @dawehner patch fixes all of that
Comment #22
dawehnerCool
Comment #26
catchCommitted/pushed to all three 8.x branches, thanks!
Comment #27
catchEr adding review credit post-commit.
Comment #28
arla commentedWhy was this copied from WebTestBase but changed from a normal config set to an override? That goes against the accompanying comment statement "some tests expect to be able to test mail system implementations" because now they cannot.
How about changing to a config set like in WebTestBase?
Comment #29
alexpott@Arla they can just set the global and be done - no?
Comment #30
alexpottAlso I don't think re-opening the issue is necessary - if we want to change this we can open another issue and add comments here to point people to it.