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.
I've got a patch to an issue which adds a new test: #1965760: Flags should use the actual token type rather than flag type when adding tokens to entity types.
The test required another contrib module, and calls it in its setUp().
QA fails the test at the module setup stage.
Comments
Comment #1
tim.plunkettYou have to declare test dependencies. See #698932: "test_dependencies" for dependencies / integration tests. There's no way for the tests to sniff your setUp calls.
Comment #2
joachim CreditAttribution: joachim commentedThanks! I'd no idea about that property!
Comment #3
joachim CreditAttribution: joachim commentedUrgh, it's still failing to enable the modules even with test_dependencies: https://qa.drupal.org/pifr/test/711333
Comment #4
drummComment #5
jthorson CreditAttribution: jthorson commentedI suspect that the test_dependencies will need to be committed to the repository before they can be picked up by project_dependency, which is what builds out the dependency chain for a given project.
The testing infrastructure does not calculate the dependencies to be checked out at run-time ... they are passed to qa.d.o from drupal.org based on project_dependency's view of the repositories. Therefore, adding the test dependency via a patch does not work.
Committing the test dependency to the repository, and triggering a rebuild of the project dependency calculation should resolve the issue.
Comment #6
jthorson CreditAttribution: jthorson commentedComment #7
joachim CreditAttribution: joachim commented> Committing the test dependency to the repository,
Done.
> and triggering a rebuild of the project dependency calculation should resolve the issue.
I presume you mean that will happen automatically when I push that commit to git?
Comment #8
jthorson CreditAttribution: jthorson commentedI verified the dependencies were rebuilt, and retested the patch; which came back green.
FWIW, In situations like this one, we need to retest the patch from within the issue queue (i.e. triggered on d.o) instead of simply re-testing on qa.d.o; since it is d.o which builds the dependency array. Triggering a retest on qa.d.o directly does not rebuild the test array.