In Scheduler #2651348-25: Port Rules integration for Scheduler to Drupal 8 I have written the first simpletests for our conditions provided for use in Rules. On my local site the tests run OK. However, when I submitted the patch for testing on d.o. it fails with the error

fail: [Other] Line 35 of modules/scheduler/src/Tests/SchedulerTestBase.php:
Unable to install modules rules, node, scheduler due to missing modules rules.

Does anyone have ideas why the Rules module may not be available for simpletest? Is it because there is no full 8.x release? I am using the dev release on my local site.

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Hi,
Does anyone know why Rules is not available on the d.o. testbots? It's been a month with no response, and this is stopping progress on our 8.x release because I cannot commit code with tests which are going to fail on D.O. even though they run fine locally.

Thanks
Jonathan

jonathan1055’s picture

Status: Active » Closed (works as designed)

Solved this. The dependency checking and module loading is done at test start-up time, before the patch is applied. So if a patch adds a module dependency, that patch testing will fail because the module is not loaded, since at test start-up the dependency is not present in the .info.yml file.

To fix this, I needed to commit a change just to add the dependency, then I could submit patches for testing and Rules module was loaded and ready for use.

Obvious when you realise, but useful to have this spelled out in case it helps anyone else.