From c3af0d6235638e17f4394ce4a0d32229d3326d5f Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Mon, 10 Apr 2023 06:04:27 -0700 Subject: [PATCH 1/3] Update test to use minor version with a download offer WordPress.org stopped offering download offers for 3.9 --- features/core-update.feature | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/features/core-update.feature b/features/core-update.feature index 2aef8068..7e816494 100644 --- a/features/core-update.feature +++ b/features/core-update.feature @@ -67,23 +67,19 @@ Feature: Update WordPress core Given a WP install And I try `wp theme install twentytwenty --activate` - When I run `wp core download --version=3.9.9 --force` + When I run `wp core download --version=4.1.30 --force` Then STDOUT should not be empty # This version of WP throws a PHP notice When I try `wp core update --minor` Then STDOUT should contain: """ - Updating to version {WP_VERSION-3.9-latest} + Updating to version {WP_VERSION-4.1-latest} """ And STDOUT should contain: """ Success: WordPress updated successfully. """ - And STDERR should contain: - """ - Undefined variable - """ And the return code should be 0 When I run `wp core update --minor` @@ -95,7 +91,7 @@ Feature: Update WordPress core When I run `wp core version` Then STDOUT should be: """ - {WP_VERSION-3.9-latest} + {WP_VERSION-4.1-latest} """ Scenario: Core update from cache From 4bacd21ec1ef30bd7753d56e453a43e8251320d5 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Mon, 10 Apr 2023 06:22:54 -0700 Subject: [PATCH 2/3] Remove test for esoteric condition that we can't reproduce --- features/core-check-update.feature | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/features/core-check-update.feature b/features/core-check-update.feature index f8745268..0683b779 100644 --- a/features/core-check-update.feature +++ b/features/core-check-update.feature @@ -40,21 +40,3 @@ Feature: Check for more recent versions """ 1 """ - - Scenario: No minor updates for an unlocalized WordPress release - Given a WP install - And I try `wp theme install twentytwenty --activate` - - # If current WP_VERSION is nightly, trunk or old then from checksums might not exist, so STDERR may or may not be empty. - When I try `wp core download --version=4.0 --locale=es_ES --force` - Then STDOUT should contain: - """ - Success: WordPress downloaded. - """ - And the return code should be 0 - - # WP core throws notice for PHP 8+. - When I try `wp core check-update --minor` - Then STDOUT should be a table containing rows: - | version | update_type | package_url | - | {WP_VERSION-4.0-latest} | minor | https://downloads.wordpress.org/release/wordpress-{WP_VERSION-4.0-latest}-partial-0.zip | From 87acac93d0c7adc316c7c035805b29315c68a248 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Mon, 10 Apr 2023 06:31:38 -0700 Subject: [PATCH 3/3] Remove the other test associated with the esoteric condition --- features/core-update.feature | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/features/core-update.feature b/features/core-update.feature index 7e816494..58d591e7 100644 --- a/features/core-update.feature +++ b/features/core-update.feature @@ -322,41 +322,6 @@ Feature: Update WordPress core When I run `wp post create --post_title='Test post' --porcelain` Then STDOUT should be a number - @less-than-php-7.3 - Scenario: Minor update on an unlocalized WordPress release - Given a WP install - And I try `wp theme install twentytwenty --activate` - And an empty cache - - # If current WP_VERSION is nightly, trunk or old then from checksums might not exist, so STDERR may or may not be empty. - When I try `wp core download --version=4.0 --locale=es_ES --force` - Then STDOUT should contain: - """ - Success: WordPress downloaded. - """ - And the return code should be 0 - - # No checksums available for this WP version/locale - Given I run `wp option set WPLANG es_ES` - When I try `wp core update --minor` - Then STDOUT should contain: - """ - Updating to version {WP_VERSION-4.0-latest} (en_US)... - """ - And STDOUT should contain: - """ - https://downloads.wordpress.org/release/wordpress-{WP_VERSION-4.0-latest}-partial-0.zip - """ - And STDOUT should contain: - """ - Success: WordPress updated successfully. - """ - And STDERR should be: - """ - Warning: Checksums not available for WordPress {WP_VERSION-4.0-latest}/es_ES. Please cleanup files manually. - """ - And the return code should be 0 - @require-php-5.6 Scenario Outline: Use `--version=(nightly|trunk)` to update to the latest nightly version Given a WP install