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

SQLite Compatibility #242

Closed
swissspidy opened this issue Oct 21, 2023 · 0 comments · Fixed by #243
Closed

SQLite Compatibility #242

swissspidy opened this issue Oct 21, 2023 · 0 comments · Fixed by #243
Milestone

Comments

@swissspidy
Copy link
Member

When I manually run the tests locally with SQLite, the following scenarios are failing (comments are inline):

# Here the rows just seem to be reversed from what is defined in the test

001 Scenario: Check for update via Version Check API # features/core-check-update.feature:3
      When I run `wp core check-update`              # features/core-check-update.feature:10
        $ wp core check-update
        version	update_type	package_url
        5.8.8	minor	https://downloads.wordpress.org/release/wordpress-5.8.8-partial-0.zip
        6.3.2	major	https://downloads.wordpress.org/release/wordpress-6.3.2.zip


# These two are related to the `CUSTOM_USER_TABLE` and `CUSTOM_USER_META_TABLE` constants
# Not working correctly with SQLite because the two test sites don't share the same database.

002 Scenario: Two WordPress installs sharing the same user table won't update existing user # features/core-install.feature:3
      Then STDOUT should be:                                                                # features/core-install.feature:52
        $ wp user list --field=user_login
        testadmin

003 Scenario: Two WordPress installs sharing the same user table will create new user # features/core-install.feature:84
      Then STDOUT should be:                                                          # features/core-install.feature:123
        $ wp user list --field=user_login
        testadmin

004 Scenario: Install WordPress with locale set to de_DE on WP >= 4.0                                                                                                                 # features/core-install.feature:219
      When I run `wp core install --url=example.org --title=Test --admin_user=testadmin [email protected] --admin_password=newpassword --locale=de_DE --skip-email` # features/core-install.feature:241
        $ wp core install --url=example.org --title=Test --admin_user=testadmin [email protected] --admin_password=newpassword --locale=de_DE --skip-email
        WordPress is already installed.

# A custom MySQL query might be the culprit here.

005 Scenario: Install WordPress multisite with existing multisite constants in wp-config file                 # features/core-install.feature:289
      When I run `wp db query "select * from wp_sitemeta where meta_key = 'site_admins' and meta_value = ''"` # features/core-install.feature:319
        $ wp db query "select * from wp_sitemeta where meta_key = 'site_admins' and meta_value = ''"
        
        ERROR 1146 (42S02) at line 1: Table 'wp_cli_test.wp_sitemeta' doesn't exist

012 Scenario: Database doesn't exist # features/core.feature:3
      When I run `wp db create`      # features/core.feature:12
        $ wp db create

013 Scenario: Install multisite from scratch, with MULTISITE already set in wp-config.php # features/core.feature:213
      Then the return code should be 1                                                    # features/core.feature:218
        $ wp core is-installed

014 Scenario: Custom wp-content directory # features/core.feature:247
      When I run `wp plugin status hello` # features/core.feature:251
        $ wp plugin status hello
        
        Error: The site you have requested is not installed.
        Run `wp core install` to create database tables.

015 Scenario: Install WordPress in a subdirectory # features/core.feature:305
      When I run `wp db create`                   # features/core.feature:349
        $ wp db create
        
        ERROR 1007 (HY000) at line 1: Can't create database 'wp_cli_test'; database exists

I left out some that seemed to fail only because of my local environment.

Let's investigate the best course of action here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants