The tests of the entity API fail, although they work for me. I recently added tests for the Rules integration, which only works if the Rules module is installed. I assume the problem is that the Rules module is not available? If so, what should we do about that?
Comments
Comment #1
avpadernoThe class
EntityAPIRulesIntegrationTestCasehas a reference to rules.module in itssetUp()method.The problem seems caused by the fact the test server install the modules that are being tested but not their dependencies.
Comment #2
fagoTo clarify Rules is no dependency of the EntityAPI, it is just used and needed for the test case.
Comment #3
avpaderno@fago: Did you try adding the dependency to rules.module in entity_test.info? The PIFR server can only detect any dependency from the .info files.
Comment #4
fagoI see. Well, the module doesn't depend on 'rules' but this sounds like a possible workaround. Going to try that.
Comment #5
avpadernoComment #6
fagoOuch, now there is another FATAL error. I guess the workaround doesn't work either, so the main tests fail now too (as there is no Rules module).
Any suggestions what to do now?
Comment #7
avpadernoPIFR is the module that handles the tests.
To make a summary, the problem is that a test can depend on a Drupal core module, or the module being tested; it's not possible for the test to require an extra module, and it's not possible to test the integration of two separated modules.
Comment #8
rfayYou can add a 'dependencies' key to your getInfo, as below. Sadly, this doesn't actually help, as the dependent module is not loaded by the testbot; there is currently no support for that. So adding the dependencies key just prevents the test from being run on the bot. But it allows a valid test to not cause your entire testsuite to fail.
Comment #9
fagoStrangely, the entity API tests suddenly work now?
See http://qa.drupal.org/pifr/test/27276
Comment #10
fagoVery strange, the profile2 tests (depending on the Entity API) are now failing because of the same problem. So it looks like some tests bots fail, others not.
I guess the bot is testing the Entity CRUD API too, because it is a dependency of profile2. However for Rules this is not the case!? Unrelated, the Rules tests also fail from time to time but that's probably another issue.
Profile2: http://qa.drupal.org/pifr/test/54698
add #8, thanks I didn't know that. Sounds like the best thing to do for now.
Comment #11
avpadernoI am not sure if the modules from which Profile2 depends are loaded, or not.
Looking at the log, the checkout operation is completed, but there are two operations that are reported to be ignored.
Comment #12
fagook, I've implemented #8 seems to work.
It says there are 4 passed for the Rules test case, what is correct. So perhaps the test bot even recognizes that key already?
Comment #13
tstoecklerWhen I add 'dependecies' the testbot still runs the tests and then fails because the modules aren't loaded. What am I doing wrong? (Clock module - http://qa.drupal.org/pifr/test/47673)
Comment #14
boombatower commentedSounds like you are looking for the soft dependencies that will be provided by #102102: Parse project .info files: present module list and dependency information.
Meaning you have dependencies required for testing, but not required for your module to work. Like "recommended" modules...modules that you provide integration for, but are not required.
Comment #15
dave reidThis also has been fixed from within SimpleTest 6.x-2.x itself. It now respsects the 'dependencies' property in getInfo() and will skip the test. It's still up to #102102: Parse project .info files: present module list and dependency information to actually pull in the proper modules for testing though.
Comment #16
avpadernoI am closing this issue, which is for a not supported Drupal version.