WordPress.org

Make WordPress Core

Changeset 51179


Ignore:
Timestamp:
06/17/2021 05:57:54 PM (3 months ago)
Author:
desrosj
Message:

Build/Test Tools: Use Git when fetching the WordPress Importer for use in tests.

This switches to using Git in the local Docker environment install script to check out a copy of the WordPress Importer plugin for use in unit tests.

Previously, SVN was used and the commands were not correctly run within the Docker container. The container does not actually have SVN installed, and the script was only working when the machine running the command had SVN present.

Props czapla, alexstine, jnylen0, francina, desrosj.
Fixes #52909.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/.env

    r50285 r51179  
    7272# The URL to use when running e2e tests.
    7373WP_BASE_URL=http://localhost:${LOCAL_PORT}
    74 
    75 ##
    76 # The revision number of the WordPress Importer plugin to use when running unit tests.
    77 #
    78 # This should be an SVN revision number from the official plugin repository on wordpress.org.
    79 ##
    80 WP_IMPORTER_REVISION=2387243
  • trunk/tools/local-env/scripts/install.js

    r50285 r51179  
    5353 */
    5454function install_wp_importer() {
    55     const test_plugin_directory = 'tests/phpunit/data/plugins/wordpress-importer';
     55    const testPluginDirectory = 'tests/phpunit/data/plugins/wordpress-importer';
    5656
    57     execSync( `docker-compose exec -T php rm -rf ${test_plugin_directory} && svn checkout -r ${process.env.WP_IMPORTER_REVISION} https://plugins.svn.wordpress.org/wordpress-importer/trunk/ ${test_plugin_directory}`, { stdio: 'inherit' } );
     57    execSync( `docker-compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } );
     58    execSync( `docker-compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } );
    5859}
Note: See TracChangeset for help on using the changeset viewer.