Make WordPress Core

Opened 7 years ago

Closed 6 weeks ago

#42668 closed enhancement (fixed)

Remove WordPress Importer tests from default test suite

Reported by: frank-klein's profile Frank Klein Owned by: desrosj's profile desrosj
Milestone: 6.8 Priority: normal
Severity: normal Version:
Component: Import Keywords: has-patch has-unit-tests commit
Focuses: Cc:

Description

The importers were removed from Core in r14764, 8 years ago. But the tests are still located in the core test suite, and are run by default.

We should exclude these tests from running by default as a first step, as it means running 14 tests less.

Ultimately these tests should be migrated to the Importer plugin repository, where they can assist with development.

Attachments (1)

42668.diff (352 bytes) - added by Frank Klein 7 years ago.

Download all attachments as: .zip

Change History (15)

@Frank Klein
7 years ago

#1 @netweb
7 years ago

The wordpress-importer import plugin is imported into our Travis CI setup and the tests are run in each CI job

See: https://core.trac.wordpress.org/browser/trunk/.travis.yml#L41

#2 @dd32
7 years ago

FWIW These should continue to be run in core until https://github.com/WordPress/wordpress-importer/issues/15 is fixed to move them over there IMHO.

Even then, running the tests with core might still be a good idea, although limiting it to 1 job instead of 5 wouldn't be a bad idea.

#3 @peterwilsoncc
8 months ago

Testing some code for #60569, I think it could be useful to run the importing tests in their own group on the WordPress-Develop CI to avoid order of operations issue for code that operates differently when importing vs during standard operations.

#4 @desrosj
5 months ago

#62167 was marked as a duplicate.

#5 follow-up: @desrosj
5 months ago

  • Keywords has-patch added

WordPress/wordpress-importer#15 was merged, but it's been 6 years now. An audit should be performed to ensure parity.

I had missed this ticket so I had opened #62167 to discuss moving the tests out of Core.

@dd32 Do you still see a benefit to continuing to run these tests in the context of WordPress Core? If so, it may be better to remove the tests from wordpress-develop and use the test files in the plugin itself instead of maintaining them in two places.

#6 in reply to: ↑ 5 @dd32
5 months ago

Replying to desrosj:

@dd32 Do you still see a benefit to continuing to run these tests in the context of WordPress Core? If so, it may be better to remove the tests from wordpress-develop and use the test files in the plugin itself instead of maintaining them in two places.

As we now have GitHub actions, I don't see the need to keep them here - as long as the importer tests run on a schedule (at least once a week?)

In one respect, It's nice that core will know when it breaks, but realistically.. I don't think there's a point in running tests in two different places.

A different ticket perhaps, but it'd be nice if core ran (again, once a week?) tests with a whole bunch of commonly used plugins active..

#7 @azaozz
5 months ago

  • Milestone changed from Awaiting Review to 6.8

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


8 weeks ago

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


6 weeks ago

#10 @desrosj
6 weeks ago

  • Owner set to desrosj
  • Status changed from new to assigned

This ticket was mentioned in PR #8269 on WordPress/wordpress-develop by @desrosj.


6 weeks ago
#11

  • Keywords has-unit-tests added

This removes the tests from Core that rely on the presence of the WordPress Importer.

These have been running in https://github.com/WordPress/wordpress-importer for several years now, and it eliminates the need to download the plugin before every run of the Core test suite.

Trac ticket: https://core.trac.wordpress.org/ticket/42668

#12 @desrosj
6 weeks ago

I've created a PR for removing the all tests from wordpress-develop except for the ones that cover get_importers(), which is shipped in Core.

There is an accompanying PR upstream in the plugin repo to sync some changes that did not make their way over, and introduce a weekly schedule event to ensure the tests continue to run: https://github.com/WordPress/wordpress-importer/pull/181.

#13 @desrosj
6 weeks ago

  • Component changed from Build/Test Tools to Import
  • Keywords commit added

#14 @desrosj
6 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 59769:

Import: Remove Importer plugin related unit tests.

The WordPress Importer plugin has been maintained separately in a repository on GitHub since 2016. However, the unit tests were left in wordpress-develop due to the lack of a CI setup on GitHub.

With GitHub Actions set up for the plugin repository, these tests are now running in two locations. Because they are more relevant to the plugin itself, the tests have been synced, will run weekly through a schedule event, and are now being removed from wordpress-develop.

The only remaining test method in the import group covers get_importers(), which is a function maintained in WordPress Core itself.

Props frank-klein, netweb, dd32, peterwilsoncc, azaozz, desrosj, swissspidy.
Fixes #42668.

Note: See TracTickets for help on using tickets.