Make WordPress Core

Opened 9 years ago

Closed 20 months ago

#42668 closed enhancement (fixed)

Remove WordPress Importer tests from default test suite

Reported by: anonymized_8769252 Owned by: desrosj
Priority: normal Milestone: 6.8
Component: Import Version:
Severity: normal Keywords: has-patch has-unit-tests commit
Cc: Focuses:

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 anonymized_8769252 9 years ago.

Download all attachments as: .zip

Change History (15)

#1 @netweb
9 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
9 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
2 years 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
2 years ago

#62167 was marked as a duplicate.

#5 follow-up: @desrosj
2 years 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
2 years 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
23 months ago

  • Milestone Awaiting Review6.8

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


20 months ago

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


20 months ago

#10 @desrosj
20 months ago

  • Owner set to desrosj
  • Status newassigned

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


20 months 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
20 months 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
20 months ago

  • Component Build/Test ToolsImport
  • Keywords commit added

#14 @desrosj
20 months ago

  • Resolutionfixed
  • Status assignedclosed

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.