From 2638a2601dcbedf7b6a905a57e8761946032505a Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 1 Nov 2023 23:50:13 +0100 Subject: [PATCH] Fix SQLite tests (#588) * Skip a couple of tests * Skip db check * Skip tests --- features/config.feature | 2 ++ features/requests.feature | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/features/config.feature b/features/config.feature index 57c276aed..9c734b242 100644 --- a/features/config.feature +++ b/features/config.feature @@ -1,6 +1,8 @@ Feature: wp-config.php tests # Regression test for https://github.com/wp-cli/extension-command/issues/247 + # Only testing on MySQL because the SQLite drop-in is not added to the custom directories in this test. + @require-mysql Scenario: __FILE__ and __DIR__ in wp-config.php don't point into the PHAR filesystem Given a WP installation And a new Phar with the same version diff --git a/features/requests.feature b/features/requests.feature index e99dfe6ad..60980a5bd 100644 --- a/features/requests.feature +++ b/features/requests.feature @@ -1,5 +1,7 @@ Feature: Requests integration with both v1 and v2 + # This test downgrades to WordPress 5.8, but the SQLite plugin requires 6.0+ + @require-mysql Scenario: Composer stack with Requests v1 Given an empty directory And a composer.json file: @@ -44,6 +46,8 @@ Feature: Requests integration with both v1 and v2 """ And STDERR should be empty + # This test downgrades to WordPress 5.8, but the SQLite plugin requires 6.0+ + @require-mysql Scenario: Current version with WordPress-bundled Requests v1 Given a WP installation And I run `wp core update --version=5.8 --force` @@ -99,6 +103,8 @@ Feature: Requests integration with both v1 and v2 Success: Installed 1 of 1 plugins. """ + # Uses `wp db create` which is not yet supported in SQLite. + @require-mysql Scenario: Composer stack with Requests v1 pulling wp-cli/wp-cli-bundle Given an empty directory And a composer.json file: @@ -150,7 +156,7 @@ Feature: Requests integration with both v1 and v2 And the {RUN_DIR}/vendor/wp-cli/wp-cli/bundle/rmccue/requests directory should exist And the {RUN_DIR}/vendor/rmccue/requests directory should not exist - When I run `vendor/bin/wp config create --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --extra-php < extra-config.php` + When I run `vendor/bin/wp config create --skip-check --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --extra-php < extra-config.php` Then STDOUT should be: """ Success: Generated 'wp-config.php' file.