Apparently the Mime Mail tests have not been working on the testbot for years - the testbot logs go back to 17 Dec 2015 and they show the tests have always been failing since then. And always failing for the same reason!
But in particular, the 7.x-1.x branch tests haven't been run since 14 May 2017, so we can't see what the failures were (old testbot runs are archived and not viewable), and we can't make the tests work on the testbot unless we have current testbot results.
My local testing suggests that these 7.x-1.x should be working. At least, they work for me locally. I suspect there was a problem with the testbot last year which caused the tests to fail, and they haven't been run since.
Anyway, please trigger the 7.x-1.x tests to run again. Also, please set up a new 7.x-1.x test that runs daily, so we get immediate notice if something breaks.
I suggest PHP 7.2 & MySQL 5.5 for the daily test, just like the 8.x-1.x branch.
Drupal core recently became compatible with PHP 7.2, so this will be a good test to see if MimeMail is compatible or if there are some things that need to be fixed for 7.2 compatibility.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | composer.patch | 460 bytes | tr |
| #7 | test-dependency.patch | 403 bytes | tr |
Comments
Comment #2
sgabe commentedI can confirm that testing is successful locally, however, they are failing remotely. I restarted the old test and added the new one as requested. Need to find out why the tests are failing...
Comment #3
tr commentedExperimenting to see what's wrong ... it looks like parent::setUp() is failing for the MimeMailRulesTestCase.
Comment #4
tr commentedTests aren't starting because testbots are currently down - see https://twitter.com/drupal_infra/status/1019616733957644288
Comment #5
tr commentedComment #6
tr commentedSigh.
Comment #7
tr commentedOK, it's been so long since I've seen this problem that I almost forgot all about it. I guess the Mime Mail tests haven't run green on the drupal.org testbot for years ...
Anyway, I believe the problem is that the testbot only knows about dependent modules declared in the .info file, and when it builds the test environment it only loads the modules that are declared in the .info. So when the Mime Mail test tries to enable rules, entity, and entity_token in the setUp(), the testbot doesn't have these modules available and setUp() fails. (The tests work locally for me because I have those modules on my Drupal site.)
The solution is to name these modules as
test_dependencies[]in the .info file. The testbot will build the test environment to include any modules that are named in test_dependencies[].The problem is, these test_dependencies[] needs to be committed to the repository BEFORE the tests will work - the test_dependencies[] will have no effect if they are added as part of a patch.
So here's a patch that just adds the test_dependencies[]. The tests won't run green until AFTER this patch is committed.
An explanation of this can be found at #2181107: test fails when adding another contrib module to enable in setUp() ...
Comment #8
tr commentedI think we can also trigger the testbot to load the test dependencies this way:
Comment #10
tr commentedcomposer.json needs regular dependencies as well as test dependencies. Trying again...
Comment #11
tr commentedOK, to summarize:
The D7 tests are currently failing because the testbot environment doesn't include Rules or Entity. This is because the testsbot parses the mimemail.info file to figure out what modules are needed in the testbot environment. Mime Mail does NOT depend on Rules or Entity, but it can use them if they are available. And in particular, Mime Mail tests DO use these modules. But since they're not required, they're not declared as dependencies in mimemail.info so the testbot doesn't load them and the tests that need these modules fail.
So the solution is to tell the testbot that these modules need to be downloaded into the testbot environment.
There are two ways to do this:
I prefer method 1), as it is entirely Drupal without the need for composer.
Regardless, one of these patches should be committed so we can use the testbot again for Mime Mail.
Comment #12
tr commentedComment #14
sgabe commentedChanged title to better reflect the issue. The patch attached in #7 has been committed, thanks!
Comment #15
tr commentedAnd the D7 tests are now running and passing!