From 35dbf0d49c528ecebbfa7352e93bf4e582c8bd7e Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 23 Oct 2023 18:26:23 +0200 Subject: [PATCH 1/9] Skip some initial tests --- features/core-install.feature | 5 +++-- features/core.feature | 10 +++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/features/core-install.feature b/features/core-install.feature index cf2d2252..9118b49e 100644 --- a/features/core-install.feature +++ b/features/core-install.feature @@ -187,7 +187,7 @@ Feature: Install WordPress core And the wp-settings.php file should exist And the {SUITE_CACHE_DIR}/core/wordpress-{VERSION}-de_DE.tar.gz file should exist - When I run `wp config create --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --locale=de_DE` + When I run `wp config create --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --locale=de_DE --skip-check` Then STDOUT should be: """ Success: Generated 'wp-config.php' file. @@ -231,7 +231,7 @@ Feature: Install WordPress core And the wp-settings.php file should exist And the {SUITE_CACHE_DIR}/core/wordpress-{VERSION}-de_DE.tar.gz file should exist - When I run `wp config create --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --locale=de_DE` + When I run `wp config create --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --locale=de_DE --skip-check` Then STDOUT should be: """ Success: Generated 'wp-config.php' file. @@ -286,6 +286,7 @@ Feature: Install WordPress core Addition of multisite constants to 'wp-config.php' skipped. You need to add them manually: """ + @require-mysql Scenario: Install WordPress multisite with existing multisite constants in wp-config file Given an empty directory And WP files diff --git a/features/core.feature b/features/core.feature index c08c217e..d68e97c3 100644 --- a/features/core.feature +++ b/features/core.feature @@ -1,5 +1,8 @@ Feature: Manage WordPress installation + # `wp db create` does not yet work on SQLite, + # See https://github.com/wp-cli/db-command/issues/234 + @require-mysql Scenario: Database doesn't exist Given an empty directory And WP files @@ -210,6 +213,9 @@ Feature: Manage WordPress installation 1 """ + # `wp db reset` does not yet work on SQLite, + # See https://github.com/wp-cli/db-command/issues/234 + @require-mysql Scenario: Install multisite from scratch, with MULTISITE already set in wp-config.php Given a WP multisite install And I run `wp db reset --yes` @@ -301,7 +307,9 @@ Feature: Manage WordPress installation """ And the return code should be 1 - @require-php-7.0 + # `wp db create` does not yet work on SQLite, + # See https://github.com/wp-cli/db-command/issues/234 + @require-php-7.0 @require-mysql Scenario: Install WordPress in a subdirectory Given an empty directory And a wp-config.php file: From 4f4a27c8eacd3fe51319d3dae1637074f7fb8292 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 23 Oct 2023 18:37:25 +0200 Subject: [PATCH 2/9] Skip test --- features/core-check-update.feature | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/core-check-update.feature b/features/core-check-update.feature index 95fb96ec..a6e1f68b 100644 --- a/features/core-check-update.feature +++ b/features/core-check-update.feature @@ -1,5 +1,7 @@ Feature: Check for more recent versions + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Check for update via Version Check API Given a WP install And I try `wp theme install twentytwenty --activate` From c78a3292e5a08ed66635022b273e58a13fa65429 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 23 Oct 2023 18:38:20 +0200 Subject: [PATCH 3/9] Skip db check --- features/core-install.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/core-install.feature b/features/core-install.feature index 9118b49e..379230b2 100644 --- a/features/core-install.feature +++ b/features/core-install.feature @@ -36,7 +36,7 @@ Feature: Install WordPress core When I run `wp --path=second user get testadmin --field=user_pass` Then save STDOUT as {ORIGINAL_PASSWORD} - When I run `wp core config {CORE_CONFIG_SETTINGS} --extra-php < extra-config` + When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --extra-php < extra-config` Then STDOUT should be: """ Success: Generated 'wp-config.php' file. @@ -107,7 +107,7 @@ Feature: Install WordPress core admin """ - When I run `wp core config {CORE_CONFIG_SETTINGS} --extra-php < extra-config` + When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --extra-php < extra-config` Then STDOUT should be: """ Success: Generated 'wp-config.php' file. From 39a82224934be10a017ada25c5ee745fe06467dc Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 23 Oct 2023 18:38:33 +0200 Subject: [PATCH 4/9] Skip more tests using an older WP version --- features/core-install.feature | 4 +++- features/core-update-db.feature | 6 ++++++ features/core-update.feature | 13 ++++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/features/core-install.feature b/features/core-install.feature index 379230b2..592d394c 100644 --- a/features/core-install.feature +++ b/features/core-install.feature @@ -216,6 +216,8 @@ Feature: Install WordPress core Kategorien """ + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Install WordPress with locale set to de_DE on WP >= 4.0 Given an empty directory And an empty cache @@ -303,7 +305,7 @@ Feature: Install WordPress core define( 'BLOG_ID_CURRENT_SITE', 1 ); """ - When I run `wp core config {CORE_CONFIG_SETTINGS} --extra-php < extra-config` + When I run `wp config create {CORE_CONFIG_SETTINGS} --extra-php < extra-config` Then STDOUT should be: """ Success: Generated 'wp-config.php' file. diff --git a/features/core-update-db.feature b/features/core-update-db.feature index 3d16991b..df10c693 100644 --- a/features/core-update-db.feature +++ b/features/core-update-db.feature @@ -1,5 +1,7 @@ Feature: Update core's database + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Update db on a single site Given a WP install And a disable_sidebar_check.php file: @@ -51,6 +53,8 @@ Feature: Update core's database 45805 """ + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Update db across network Given a WP multisite install And a disable_sidebar_check.php file: @@ -91,6 +95,8 @@ Feature: Update core's database {UPDATE_VERSION} """ + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Update db across network, dry run Given a WP multisite install And a disable_sidebar_check.php file: diff --git a/features/core-update.feature b/features/core-update.feature index 8c4e650f..92597235 100644 --- a/features/core-update.feature +++ b/features/core-update.feature @@ -1,5 +1,7 @@ Feature: Update WordPress core + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Update from a ZIP file Given a WP install And I try `wp theme install twentytwenty --activate` @@ -63,6 +65,8 @@ Feature: Update WordPress core {WP_VERSION-4.1-latest} """ + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Update to the latest minor release (PHP 7.1 compatible with WP >= 3.9) Given a WP install And I try `wp theme install twentytwenty --activate` @@ -97,6 +101,8 @@ Feature: Update WordPress core {WP_VERSION-4.1-latest} """ + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Core update from cache Given a WP install And I try `wp theme install twentytwenty --activate` @@ -146,6 +152,8 @@ Feature: Update WordPress core Updating """ + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Ensure cached partial upgrades aren't used in full upgrade Given a WP install And I try `wp theme install twentytwenty --activate` @@ -215,7 +223,8 @@ Feature: Update WordPress core wordpress-4.2.4-partial-1-en_US.zip """ - @less-than-php-7.3 + # SQLite requires WordPress 6.0+. + @less-than-php-7.3 @require-mysql Scenario: Make sure files are cleaned up Given a WP install And I try `wp theme install twentytwenty --activate` @@ -250,6 +259,8 @@ Feature: Update WordPress core When I run `wp post create --post_title='Test post' --porcelain` Then STDOUT should be a number + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Make sure files are cleaned up with mixed case Given a WP install And I try `wp theme install twentytwenty --activate` From 399bc144c9a2a58b6a78e79fb1f6a0645ac91673 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 23 Oct 2023 18:58:24 +0200 Subject: [PATCH 5/9] Skip more tests --- features/core-update-db.feature | 2 ++ features/core.feature | 2 ++ 2 files changed, 4 insertions(+) diff --git a/features/core-update-db.feature b/features/core-update-db.feature index df10c693..2a779941 100644 --- a/features/core-update-db.feature +++ b/features/core-update-db.feature @@ -27,6 +27,8 @@ Feature: Update core's database Success: WordPress database already at latest db version 47018. """ + # SQLite requires WordPress 6.0+. + @require-mysql Scenario: Dry run update db on a single site Given a WP install And a disable_sidebar_check.php file: diff --git a/features/core.feature b/features/core.feature index d68e97c3..df9ab7c9 100644 --- a/features/core.feature +++ b/features/core.feature @@ -250,6 +250,8 @@ Feature: Manage WordPress installation """ And the return code should be 1 + # SQLite compat blocked by https://github.com/wp-cli/wp-cli-tests/pull/188. + @require-mysql Scenario: Custom wp-content directory Given a WP install And a custom wp-content directory From cf8175ab5b1cdaa5e8203df2a103631175805252 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 23 Oct 2023 18:59:27 +0200 Subject: [PATCH 6/9] Skip `CUSTOM_USER_TABLE` tests --- features/core-install.feature | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/core-install.feature b/features/core-install.feature index 592d394c..ca4928e4 100644 --- a/features/core-install.feature +++ b/features/core-install.feature @@ -1,5 +1,7 @@ Feature: Install WordPress core + # TODO: Requires investigation for SQLite support. + @require-mysql Scenario: Two WordPress installs sharing the same user table won't update existing user Given an empty directory And WP files @@ -81,6 +83,8 @@ Feature: Install WordPress core wp_users """ + # TODO: Requires investigation for SQLite support. + @require-mysql Scenario: Two WordPress installs sharing the same user table will create new user Given an empty directory And WP files From cafdaa4de9d4563b112a5bc5aa9523784eef6156 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 25 Oct 2023 16:01:41 +0200 Subject: [PATCH 7/9] Clarify comments --- features/core-check-update.feature | 2 +- features/core-install.feature | 2 +- features/core-update-db.feature | 8 ++++---- features/core-update.feature | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/features/core-check-update.feature b/features/core-check-update.feature index a6e1f68b..022b2a16 100644 --- a/features/core-check-update.feature +++ b/features/core-check-update.feature @@ -1,6 +1,6 @@ Feature: Check for more recent versions - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Check for update via Version Check API Given a WP install diff --git a/features/core-install.feature b/features/core-install.feature index ca4928e4..f50c7df9 100644 --- a/features/core-install.feature +++ b/features/core-install.feature @@ -220,7 +220,7 @@ Feature: Install WordPress core Kategorien """ - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Install WordPress with locale set to de_DE on WP >= 4.0 Given an empty directory diff --git a/features/core-update-db.feature b/features/core-update-db.feature index 2a779941..9e322978 100644 --- a/features/core-update-db.feature +++ b/features/core-update-db.feature @@ -1,6 +1,6 @@ Feature: Update core's database - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update db on a single site Given a WP install @@ -27,7 +27,7 @@ Feature: Update core's database Success: WordPress database already at latest db version 47018. """ - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Dry run update db on a single site Given a WP install @@ -55,7 +55,7 @@ Feature: Update core's database 45805 """ - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update db across network Given a WP multisite install @@ -97,7 +97,7 @@ Feature: Update core's database {UPDATE_VERSION} """ - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update db across network, dry run Given a WP multisite install diff --git a/features/core-update.feature b/features/core-update.feature index 92597235..2ae06c69 100644 --- a/features/core-update.feature +++ b/features/core-update.feature @@ -1,6 +1,6 @@ Feature: Update WordPress core - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update from a ZIP file Given a WP install @@ -65,7 +65,7 @@ Feature: Update WordPress core {WP_VERSION-4.1-latest} """ - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update to the latest minor release (PHP 7.1 compatible with WP >= 3.9) Given a WP install @@ -101,7 +101,7 @@ Feature: Update WordPress core {WP_VERSION-4.1-latest} """ - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Core update from cache Given a WP install @@ -152,7 +152,7 @@ Feature: Update WordPress core Updating """ - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Ensure cached partial upgrades aren't used in full upgrade Given a WP install @@ -223,7 +223,7 @@ Feature: Update WordPress core wordpress-4.2.4-partial-1-en_US.zip """ - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @less-than-php-7.3 @require-mysql Scenario: Make sure files are cleaned up Given a WP install @@ -259,7 +259,7 @@ Feature: Update WordPress core When I run `wp post create --post_title='Test post' --porcelain` Then STDOUT should be a number - # SQLite requires WordPress 6.0+. + # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Make sure files are cleaned up with mixed case Given a WP install From fb1c0083ff667ba2e1958b446d440dd2fb1a4b7c Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 2 Nov 2023 08:49:51 +0100 Subject: [PATCH 8/9] Fix double comments --- features/core-check-update.feature | 2 +- features/core-install.feature | 2 +- features/core-update-db.feature | 8 ++++---- features/core-update.feature | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/features/core-check-update.feature b/features/core-check-update.feature index 022b2a16..3eda2d73 100644 --- a/features/core-check-update.feature +++ b/features/core-check-update.feature @@ -1,6 +1,6 @@ Feature: Check for more recent versions - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Check for update via Version Check API Given a WP install diff --git a/features/core-install.feature b/features/core-install.feature index f50c7df9..580d5fa9 100644 --- a/features/core-install.feature +++ b/features/core-install.feature @@ -220,7 +220,7 @@ Feature: Install WordPress core Kategorien """ - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Install WordPress with locale set to de_DE on WP >= 4.0 Given an empty directory diff --git a/features/core-update-db.feature b/features/core-update-db.feature index 9e322978..26c0b868 100644 --- a/features/core-update-db.feature +++ b/features/core-update-db.feature @@ -1,6 +1,6 @@ Feature: Update core's database - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update db on a single site Given a WP install @@ -27,7 +27,7 @@ Feature: Update core's database Success: WordPress database already at latest db version 47018. """ - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Dry run update db on a single site Given a WP install @@ -55,7 +55,7 @@ Feature: Update core's database 45805 """ - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update db across network Given a WP multisite install @@ -97,7 +97,7 @@ Feature: Update core's database {UPDATE_VERSION} """ - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update db across network, dry run Given a WP multisite install diff --git a/features/core-update.feature b/features/core-update.feature index 2ae06c69..3f50c6ad 100644 --- a/features/core-update.feature +++ b/features/core-update.feature @@ -1,6 +1,6 @@ Feature: Update WordPress core - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update from a ZIP file Given a WP install @@ -65,7 +65,7 @@ Feature: Update WordPress core {WP_VERSION-4.1-latest} """ - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Update to the latest minor release (PHP 7.1 compatible with WP >= 3.9) Given a WP install @@ -101,7 +101,7 @@ Feature: Update WordPress core {WP_VERSION-4.1-latest} """ - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Core update from cache Given a WP install @@ -152,7 +152,7 @@ Feature: Update WordPress core Updating """ - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Ensure cached partial upgrades aren't used in full upgrade Given a WP install @@ -223,7 +223,7 @@ Feature: Update WordPress core wordpress-4.2.4-partial-1-en_US.zip """ - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @less-than-php-7.3 @require-mysql Scenario: Make sure files are cleaned up Given a WP install @@ -259,7 +259,7 @@ Feature: Update WordPress core When I run `wp post create --post_title='Test post' --porcelain` Then STDOUT should be a number - # # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ + # This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+ @require-mysql Scenario: Make sure files are cleaned up with mixed case Given a WP install From 5e7ef1c892ffd654625e111a826233aed81658c5 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 2 Nov 2023 08:53:21 +0100 Subject: [PATCH 9/9] Update comments --- features/core-install.feature | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/core-install.feature b/features/core-install.feature index 580d5fa9..8fc13cfd 100644 --- a/features/core-install.feature +++ b/features/core-install.feature @@ -1,6 +1,7 @@ Feature: Install WordPress core # TODO: Requires investigation for SQLite support. + # See https://github.com/wp-cli/core-command/issues/244 @require-mysql Scenario: Two WordPress installs sharing the same user table won't update existing user Given an empty directory @@ -84,6 +85,7 @@ Feature: Install WordPress core """ # TODO: Requires investigation for SQLite support. + # See https://github.com/wp-cli/core-command/issues/244 @require-mysql Scenario: Two WordPress installs sharing the same user table will create new user Given an empty directory