Automated tests seem to be failing on 8.x-7.x branch

Created on 21 February 2025, about 2 months ago

Problem/Motivation

If you go to this project's home page, you will see under 8.x-7.0-alpha5, a link to GitLab pipelines, and to the left of the "View pipelines" link, there is a red X in a circle.

The failing pipeline for he 8.x-7.x branch seems to be https://git.drupalcode.org/project/elasticsearch_connector/-/pipelines/2...

Steps to reproduce

This can be reproduced locally by following the instructions at https://github.com/ddev/ddev-drupal-contrib using Drupal 10 core.

Proposed resolution

On this project's home page it is indicated that branch 8.x-7.x is subject to security and bug fixes only. Determine if failing tests is deemed to be a bug which falls under this category; and if so consider fixing the failing tests.

Details

The first problem is that we have:

PHP Fatal error:  Declaration of Drupal\Tests\elasticsearch_connector\Kernel\ClusterSchemaTest::setUp() must be compatible with Drupal\KernelTests\KernelTestBase::setUp(): void in /builds/project/elasticsearch_connector/tests/src/Kernel/ClusterSchemaTest.php on line 30

But once we fix that, we get other issues (at least locally) such as:

2) Drupal\elasticsearch_connector\Tests\Kernel\ElasticsearchTest::testFramework
TypeError: Drupal\search_api\Utility\FieldsHelper::createField(): Argument #1 ($index) must be of type Drupal\search_api\IndexInterface, null given, called in /var/www/html/web/modules/contrib/search_api/modules/search_api_db/tests/src/Kernel/BackendTest.php on line 105

/var/www/html/web/modules/contrib/search_api/src/Utility/FieldsHelper.php:485
/var/www/html/web/modules/contrib/search_api/modules/search_api_db/tests/src/Kernel/BackendTest.php:105
/var/www/html/tests/src/Kernel/ElasticsearchTest.php:58
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

which seem to step from ElasticsearchTest's usage of a search_api helper function which doesn't seem to return the right type.

🐛 Bug report
Status

Active

Version

7.0

Component

Code

Created by

🇨🇦Canada alberto56

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024