Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SQLite tests #588

Merged
merged 5 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions features/config.feature
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 7 additions & 1 deletion features/requests.feature
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down