Skip to content

'No such file or dir errors' reporting for multiple hosts #83

@kittenkamala

Description

@kittenkamala

Test failures are being reported by a few hosts:

https://make.wordpress.org/hosting/test-results/r48410/a2hostinbot-r48410/
https://make.wordpress.org/hosting/test-results/r48410/ionosbot-r48410/
https://make.wordpress.org/hosting/test-results/r48410/sakurabot-r48410/

On the host's end, the output is as follows:

WP_REST_Plugins_Controller_Test::test_create_item
unlink(/var/www/vhosts/wp-test-runner/tests/phpunit/includes/../data/link-manager.zip): No such file or directory
WP_REST_Plugins_Controller_Test::test_create_item_and_activate
unlink(/var/www/vhosts/wp-test-runner/tests/phpunit/includes/../data/link-manager.zip): No such file or directory
WP_REST_Plugins_Controller_Test::test_create_item_and_activate_errors_if_no_permission_to_activate_plugin

This was suggested in the #hosting-community channel

"sstoyanov 6:08 AM
Hey, I made some progress with the issue of the failing tests. Here is what I've found:
For some reason, the WP_Upgrader->run is called twice for each failing test.
The unpack_package is also called twice(because the WP_Upgrader->run method is called twice ).
When unpack_package is trying to unlink the file, but it exists only for the first iteration.
I've added file_exists check in the method above, and for each test, I got true, followed by false, which means that the method is trying to delete the link-manager.zip twice."

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions