aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/integration/includes/libs/filebackend
Commit message (Collapse)AuthorAgeFilesLines
* tests: Show a more informative error message when teardown is skippedTim Starling2024-12-131-1/+3
| | | | | | | | | | | | If mediaWikiSetUp() is called but not mediaWikiTearDown(), throw an exception when the next test is set up. This previously failed for database tests in ChangedTablesTracker with an unhelpful error message. Interestingly, there was at least one non-database test that was throwing errors from tearDown() unconditionally. Bug: T354387 Change-Id: I9a7b169026f5fb491529b0f8ae7bec582ca485b6
* PHPUnit: Use FQCN with leading backslash in @covers annotationFomafix2024-11-191-1/+1
| | | | | | | | | | | https://docs.phpunit.de/en/11.4/annotations.html#covers recommends: > Please note that this annotation requires a fully-qualified class > name (FQCN). To make this more obvious to the reader, it is > recommended to use a leading backslash (even if this not required for > the annotation to work correctly). Change-Id: I7eb4b997346387e5799fa27a61ab317573124fd0
* FileRepo: Add support for the new Shellbox large file featureTim Starling2024-10-291-2/+42
| | | | | | | | | | | | | | | | | | | * Add FileBackend::addShellboxInputFile(), allowing Shellbox to read directly from a FileBackend. Add generic, FS and Swift implementations. * Add FileRepo wrapper, which takes a FileRepo virtual URL. * Add File::addToShellboxCommand(), which allows a File to be used as input in a Shellbox command. * Add configuration. * Extend FileBackend::getFileHttpUrl(), adding method and ipRange parameters. Unindent existing code. I was going to add support for PUT requests, but I reverted it due to the impossibility of supporting FileBackendMultiWrite. I left the method parameter in getFileHttpUrl(). Bug: T292322 Change-Id: If9487a0c9586065bf044b69ac04cc7a06b6e8856
* tests: Use namespaced classesUmherirrender2024-10-215-18/+25
| | | | | | | | Changes to the use statements and some additions are done automatically via script This also updates @covers tag for the namespaced classes Change-Id: I859ba6d05018c99710b744e2becab432410d3bca
* Add namespace to remaining parts of Wikimedia\FileBackendJames D. Forrester2024-10-031-10/+11
| | | | | Bug: T353458 Change-Id: I49c843c9d8f6459c0fbf774afeea7a82fa564b59
* libs: Add missing documentation to class propertiesUmherirrender2024-09-131-0/+1
| | | | | | | | | | Add doc-typehints to class properties found by the PropertyDocumentation sniff to improve the documentation. Once the sniff is enabled it avoids that new code is missing type declarations. This is focused on documentation and does not change code. Change-Id: I46f46f1855ca32c89a276b06f4e2051ff541886e
* tests: Use namespaced classes (2)Umherirrender2024-06-131-0/+2
| | | | | | | Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I4ff4d0c10820dc2a3b8419b4115fadf81a76f7a2
* Add namespace and deprecation alias to FileBackendGroupEbrahim Byagowi2024-05-201-1/+1
| | | | | | | | | This patch introduces a namespace declaration for the MediaWiki\FileBackend to FileBackendGroup and establishes a class alias marked as deprecated since version 1.43. Bug: T353458 Change-Id: Id33b6bfa56131978900199786b0082481c6c54a5
* Add namespace and deprecation alias to FileBackendEbrahim Byagowi2024-05-192-1/+2
| | | | | | | | | This patch introduces a namespace declaration for the Wikimedia\FileBackend to FileBackend and establishes a class alias marked as deprecated since version 1.43. Bug: T353458 Change-Id: Id897687b1d679fd7d179e3a32e617aae10ebff33
* filebackend: Refactor FileBackendIntegrationTestTim Starling2024-03-145-0/+2243
FileBackendIntegrationTest was running tests against different backends in an unconventional way, using a combination of wrapper test cases that run tests against two different classes, and CLI options which don't really exist anymore and have an associated fixme. So: * Move the bulk of FileBackendIntegrationTest to a new abstract base class under tests/phpunit/integration. * Add subclasses for the FS and multiwrite test cases. This allows us to eliminate the wrappers. * Add a subclass for MemoryFileBackend. * Add a Swift subclass which replaces the main use case for the CLI option --use-filebackend. It is automatically enabled when a Swift backend is configured, similar to PostgreSQL tests. * Some miscellaneous tests with a medium level of integration, not requiring backend setup and teardown, were moved to new classes FileBackendMultiWriteTest and FileBackendStoreTest. Change-Id: I0da531349d7627970a7bcb34f3c1f5fd7e05cb21