Skip to content

Commit

Permalink
Fix SQLite tests (#588)
Browse files Browse the repository at this point in the history
* Skip a couple of tests

* Skip db check

* Skip tests
  • Loading branch information
swissspidy committed Nov 1, 2023
1 parent 4142af1 commit 2638a26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 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
Expand Down
8 changes: 7 additions & 1 deletion 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:
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

0 comments on commit 2638a26

Please sign in to comment.