Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing integration tests for MW 1.40 #885

Open
gesinn-it-ilm opened this issue Dec 19, 2024 · 2 comments
Open

Fix failing integration tests for MW 1.40 #885

gesinn-it-ilm opened this issue Dec 19, 2024 · 2 comments
Assignees
Labels

Comments

@gesinn-it-ilm
Copy link
Contributor

gesinn-it-ilm commented Dec 19, 2024

For MW 1.40 there are 4 failing integration tests.
Looks like the parser functions are not registered correctly.

Example one of those failing tests:

1) SRF\Tests\Integration\JSONScript\JsonTestCaseScriptRunnerTest::testCaseFile with data set "bibtex-01.json" ('/var/www/html/extensions/Sema...1.json')
Failed "#0 `format=bibtex` empty (bibtex-01-0.bib)"

==== (actual) ====

==== (StringContains expected) ====
[ @Book{,
} ]

Failed asserting that 0 matches expected 1.

/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/Utils/Validators/StringValidator.php:78
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/Utils/Validators/StringValidator.php:32
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/Utils/JSONScript/SpecialPageTestCaseProcessor.php:152
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/Utils/JSONScript/SpecialPageTestCaseProcessor.php:94
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/JSONScriptServicesTestCaseRunner.php:395
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/JSONScriptServicesTestCaseRunner.php:135
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/JSONScriptTestCaseRunner.php:237
/var/www/html/tests/phpunit/MediaWikiIntegrationTestCase.php:521
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/SMWIntegrationTestCase.php:205

Steps to reproduce the failures:

  • the tests are bibtex-01.json, gallery-01.json, gallery-02.json and gallery-03.json
  • from those tests remove skip-on parts which contain mediawiki version 1.39 and 1.40 like:
"skip-on": {
      "mediawiki": [
	        ">1.40",
	        "Check parser function registration for MW 1.40+"
        ]
}
"skip-on": {
        "mediawiki": [ ">1.39.x", "Check parser function registration for MW 1.40+" ]
}
  • run the CI locally for MW 1.40 with the var set like this:
# docker images
MW_VERSION?=1.40
PHP_VERSION?=8.1
DB_TYPE?=mysql
DB_IMAGE?="mariadb:11.2"

# extensions
SMW_VERSION?=dev-master
PF_VERSION ?= 5.5.1
SFS_VERSION ?= 4.0.0-beta
MM_VERSION ?= 3.1.0
@gesinn-it-ilm
Copy link
Contributor Author

gesinn-it-ilm commented Dec 19, 2024

@paladox the issue is updated. You can see here the example of one failing test, and the steps to reproduce it.

@paladox
Copy link
Contributor

paladox commented Dec 28, 2024

Ah thanks! I'm not sure how to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants