From 320de7bea7a930d3fc1d71fe842559b7753aacf6 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 18 Dec 2024 09:37:23 +0100 Subject: [PATCH 1/3] Try to fix flaky test with a regex --- features/core-check-update.feature | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/features/core-check-update.feature b/features/core-check-update.feature index 6a276919..c45c9d51 100644 --- a/features/core-check-update.feature +++ b/features/core-check-update.feature @@ -9,11 +9,9 @@ Feature: Check for more recent versions When I run `wp core download --version=5.8 --force` Then STDOUT should not be empty - When I run `wp core check-update` - Then STDOUT should be a table containing rows: - | version | update_type | package_url | - | {WP_VERSION-latest} | major | https://downloads.wordpress.org/release/wordpress-{WP_VERSION-latest}.zip | - | {WP_VERSION-5.8-latest} | minor | https://downloads.w.org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip | + When I run `wp core check-update --format=csv` + Then STDOUT should match #^{WP_VERSION-latest},major,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-latest}.zip$# + And STDOUT should match #^{WP_VERSION-5.8-latest},minor,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip$# When I run `wp core check-update --format=count` Then STDOUT should be: @@ -21,10 +19,8 @@ Feature: Check for more recent versions 2 """ - When I run `wp core check-update --major` - Then STDOUT should be a table containing rows: - | version | update_type | package_url | - | {WP_VERSION-latest} | major | https://downloads.wordpress.org/release/wordpress-{WP_VERSION-latest}.zip | + When I run `wp core check-update --major --format=csv` + Then STDOUT should match #^{WP_VERSION-latest},major,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-latest}.zip$# When I run `wp core check-update --major --format=count` Then STDOUT should be: @@ -33,9 +29,7 @@ Feature: Check for more recent versions """ When I run `wp core check-update --minor` - Then STDOUT should be a table containing rows: - | version | update_type | package_url | - | {WP_VERSION-5.8-latest} | minor | https://downloads.w.org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip | + Then STDOUT should match #^{WP_VERSION-5.8-latest},minor,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip$# When I run `wp core check-update --minor --format=count` Then STDOUT should be: From ee8a00f86a61954a071c1643f511e0b183d842d3 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 18 Dec 2024 09:51:13 +0100 Subject: [PATCH 2/3] Update regex --- features/core-check-update.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/core-check-update.feature b/features/core-check-update.feature index c45c9d51..45a85566 100644 --- a/features/core-check-update.feature +++ b/features/core-check-update.feature @@ -10,8 +10,8 @@ Feature: Check for more recent versions Then STDOUT should not be empty When I run `wp core check-update --format=csv` - Then STDOUT should match #^{WP_VERSION-latest},major,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-latest}.zip$# - And STDOUT should match #^{WP_VERSION-5.8-latest},minor,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip$# + Then STDOUT should match #{WP_VERSION-latest},major,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-latest}.zip# + And STDOUT should match #{WP_VERSION-5.8-latest},minor,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip# When I run `wp core check-update --format=count` Then STDOUT should be: @@ -20,7 +20,7 @@ Feature: Check for more recent versions """ When I run `wp core check-update --major --format=csv` - Then STDOUT should match #^{WP_VERSION-latest},major,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-latest}.zip$# + Then STDOUT should match #{WP_VERSION-latest},major,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-latest}.zip# When I run `wp core check-update --major --format=count` Then STDOUT should be: @@ -29,7 +29,7 @@ Feature: Check for more recent versions """ When I run `wp core check-update --minor` - Then STDOUT should match #^{WP_VERSION-5.8-latest},minor,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip$# + Then STDOUT should match #{WP_VERSION-5.8-latest},minor,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip# When I run `wp core check-update --minor --format=count` Then STDOUT should be: From 56bcdc297af2fdfdb6517059ad13dec852659574 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 20 Dec 2024 10:48:15 +0100 Subject: [PATCH 3/3] Add missing csv format --- features/core-check-update.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/core-check-update.feature b/features/core-check-update.feature index 45a85566..32ede965 100644 --- a/features/core-check-update.feature +++ b/features/core-check-update.feature @@ -28,7 +28,7 @@ Feature: Check for more recent versions 1 """ - When I run `wp core check-update --minor` + When I run `wp core check-update --minor --format=csv` Then STDOUT should match #{WP_VERSION-5.8-latest},minor,https://downloads.(w|wordpress).org/release/wordpress-{WP_VERSION-5.8-latest}-partial-0.zip# When I run `wp core check-update --minor --format=count`