Make WordPress Core

Opened 7 days ago

Last modified 4 days ago

#52579 new defect (bug)

Delete link-manager.zip after running the REST API plugins controller tests

Reported by: johnbillion Owned by:
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.5
Component: Build/Test Tools Keywords: needs-patch
Focuses: Cc:


After running the PHPUnit tests the untracked DIR_TESTDATA/link-manager.zip file is left in place, creating a dirty working copy. See WP_REST_Plugins_Controller_Test::setup_plugin_download().

This file should be deleted after the tests that use it have run.

Introduced in [48242].

cc @TimothyBlynJacobs

Change History (2)

#1 @TimothyBlynJacobs
7 days ago

I feel like something regressed here, because I don't think it did this when it was initially committed. IIRC, setup_plugin_download copies the zip to the alternate location because after the plugin was installed, the source file was being deleted. I'm not sure why it isn't being deleted anymore. Looking at the call to unpack_package in WP_Upgrader::run it seems like it should be being deleted.

That being said, we could probably add an unlink in tearDown like we're currently doing for the test plugin regardless.

#2 @desrosj
4 days ago

  • Milestone changed from Awaiting Review to 5.8
Note: See TracTickets for help on using tickets.