Skip to content

Conversation

@come-nc
Copy link
Contributor

@come-nc come-nc commented Sep 4, 2025

Summary

Fail on PHPUnit warnings and risky tests, show deprecations.

Checklist

@come-nc come-nc self-assigned this Sep 4, 2025
@come-nc come-nc force-pushed the fix/show-phpunit-warnings branch 2 times, most recently from 58e0aa5 to 73cc44d Compare September 9, 2025 09:11
@come-nc come-nc force-pushed the fix/show-phpunit-warnings branch 2 times, most recently from f1761d8 to 6aca9f8 Compare September 16, 2025 15:51
@come-nc
Copy link
Contributor Author

come-nc commented Sep 16, 2025

nodb tests are now passing.
There is still work on DB tests.

For s3 tests, we have:

3 tests triggered 4 PHP warnings:

1) /home/runner/actions-runner/_work/server/server/lib/private/Files/ObjectStore/S3ObjectTrait.php:74
fopen(http://localhost:9000/nextcloud/2): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

Triggered by:

* Test\Files\ObjectStore\S3Test::testDelete
  /home/runner/actions-runner/_work/server/server/tests/lib/Files/ObjectStore/ObjectStoreTestCase.php:64

2) /home/runner/actions-runner/_work/server/server/lib/private/Files/Stream/SeekableHttpStream.php:50
fopen(httpseek://): Failed to open stream: "OC\Files\Stream\SeekableHttpStream::stream_open" call failed

Triggered by:

* Test\Files\ObjectStore\S3Test::testDelete
  /home/runner/actions-runner/_work/server/server/tests/lib/Files/ObjectStore/ObjectStoreTestCase.php:64

* Test\Files\ObjectStore\S3Test::testEmptyUpload
  /home/runner/actions-runner/_work/server/server/tests/lib/Files/ObjectStore/S3Test.php:107

* Test\Files\ObjectStore\S3Test::testReadNonExisting
  /home/runner/actions-runner/_work/server/server/tests/lib/Files/ObjectStore/ObjectStoreTestCase.php:83

3) /home/runner/actions-runner/_work/server/server/lib/private/Files/ObjectStore/S3ObjectTrait.php:74
fopen(http://localhost:9000/nextcloud/non-existing): Failed to open stream: HTTP request failed! HTTP/1.1 [40](https://github.com/nextcloud/server/actions/runs/17771530041/job/50508637858?pr=54905#step:7:41)4 Not Found

Triggered by:

* Test\Files\ObjectStore\S3Test::testReadNonExisting
  /home/runner/actions-runner/_work/server/server/tests/lib/Files/ObjectStore/ObjectStoreTestCase.php:83

4) /home/runner/actions-runner/_work/server/server/lib/private/Files/ObjectStore/S3ObjectTrait.php:74
fopen(http://localhost:9000/nextcloud/emptystream): Failed to open stream: HTTP request failed! HTTP/1.1 [41](https://github.com/nextcloud/server/actions/runs/17771530041/job/50508637858?pr=54905#step:7:42)6 Requested Range Not Satisfiable

Triggered by:

* Test\Files\ObjectStore\S3Test::testEmptyUpload
  /home/runner/actions-runner/_work/server/server/tests/lib/Files/ObjectStore/S3Test.php:107

There is no easy way to ignore those it seems, apart from using a custom error handler for these tests.
Should we do that? It seems the code intent is that fopen warning gets logged.

@come-nc
Copy link
Contributor Author

come-nc commented Sep 16, 2025

ref sebastianbergmann/phpunit#5062

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Turn data providers into static methods, mostly.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
…icationTest

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
…tests

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
…dlewareTest

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc force-pushed the fix/show-phpunit-warnings branch from df0135a to 8107f61 Compare September 27, 2025 11:05
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc force-pushed the fix/show-phpunit-warnings branch from e504e27 to 5e9af71 Compare September 27, 2025 11:47
@come-nc come-nc added the 3. to review Waiting for reviews label Sep 27, 2025
@come-nc come-nc added this to the Nextcloud 33 milestone Sep 27, 2025
@come-nc come-nc added the tests Related to tests label Sep 27, 2025
@come-nc come-nc marked this pull request as ready for review September 27, 2025 11:48
@come-nc come-nc requested review from CarlSchwan and icewind1991 and removed request for a team September 27, 2025 11:48
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@provokateurin provokateurin merged commit ef336fe into master Sep 27, 2025
209 of 211 checks passed
@provokateurin provokateurin deleted the fix/show-phpunit-warnings branch September 27, 2025 12:24
@skjnldsv skjnldsv modified the milestones: Nextcloud 33, Nextcloud 32 Oct 2, 2025
@nextcloud-bot nextcloud-bot mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants