Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Our automated tests have started failing, without any change to the Scheduler code. The failures are all within the Rules tests.
For an example see https://www.drupal.org/pift-ci-job/595519
The fails are at D8.4 and 8.3, but 8.2 still passes OK. I am sure that 8.3 used to be OK, so maybe Rules module have changed something.
Comment | File | Size | Author |
---|---|---|---|
#19 | 2851618-19.restore_rules_tests.patch | 72.03 KB | jonathan1055 |
|
Comments
Comment #2
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThe error text (pasted here to allow searching on) is
Rules module have the same failures in their own tests - see #2852231: Cache bin doesn't follow the naming convention
Our tests were passing at core 8.3 on 21st Dec and failing by 3rd Feb. As a temporary solution, I am going to make the Rules tests not run during our testing, so that we can resume normal testing and committing of code.
Comment #3
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedI have raised #2854481: RulesUiDefinition must be abstract or implement two missing methods on the Rules issue queue asking for this to be fixed.
Comment #4
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedPatch to make the Rules tests non-discoverable and hence not run. This is a temporary change, to get our automated tests passing again.
Comment #6
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThe tests failed due to
Warning: No tests found in class "Drupal\Tests\scheduler\Functional\SchedulerRulesActionsTest".
Yes I knew that! I have not found a way to just comment out the test functions or make them not run. Hence going to rename the three files from .php to .txt so they still exist but will not be detected and run during tests.
Comment #10
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedGood. We now have all passing tests in the committed codebase.
This issue is now postponed, waiting on #2854481: RulesUiDefinition must be abstract or implement two missing methods after which we can reinstate our Rules tests.
Comment #11
kmajzlik CreditAttribution: kmajzlik at Ciklum Western Europe commentedComment #12
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThanks karlos007,
The Rules patch on #2849779: Implement missing PluginDefinitionInterface methods in RulesUiDefinition seems good. It fixes the installation error and automated testing. Hope it can be committed to Rules soon.
Comment #13
Stephen OllmanNice Work!!!
Comment #14
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commented#2849779: Implement missing PluginDefinitionInterface methods in RulesUiDefinition has been committed to Rules dev code on d.o.
This patch restores our three test files.
Comment #16
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedActionsTest was missed due to a typo, I had EventsTest in the patch twice. Try again.
Comment #18
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedAh. Testing on D.O. uses the tagged releases of dependency modules
So the tests fail just as before, because it uses the alpha2 release. Using the dev Rules code would now pass.
Comment #19
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commented#2880164: Make new Rules release 8.x-3.0-alpha3 is fixed so the Scheduler rules tests should pass now. This patch restores the three test files.
Comment #21
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThe tests on drupal.org use
//git.drupal.org/project/rules.git,8.x-3.0-alpha3
so our tests now pass.Fixed.
Comment #22
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedUnassigning.
Comment #24
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedI've removed the @todo comments at the top of each test file, which got left in accidentally.
The commit auto-comment does not seem to be generated (maybe when the issue is closed?) so here is the commit