Skip to content

SQLite Compatibility #167

Closed
Closed

Description

@swissspidy

When I manually run the tests locally with SQLite, the following scenario is failing:

001 Scenario: No wp-config.php  # features/config-create.feature:3
When I run `wp db create` # features/config-create.feature:60
$ wp db create

ERROR 1007 (HY000) at line 1: Can't create database 'wp_cli_test'; database exists

The way the SQLite db is set up for the tests, the error message when trying to run wp db create makes sense.

Possible options:

  • See if this can be resolved via a change to the db command
  • Make this scenario MySQL-only and add another, SQLite-only scenario that doesn't have the wp db create step.

Activity

  1. added
    command:config-create
    command:config
    scope:testing
    and removed
    command:config-create
    on Oct 21, 2023
  2. mrsdizzie commented on Oct 25, 2023

    @mrsdizzie
    Member

    I think also something that could be fixed for general SQLite use:

    wp config create --skip-check
    Error: Parameter errors:
     missing --dbname parameter (Set the database name.)
     missing --dbuser parameter (Set the database user.)
    

    These are set in tests so it is OK -- but SQLite does not need them so maybe it can check for SQLite and not require those. Right now you couldn't install WordPress with SQLite only without having to specify a dbname and dbuser that won't get used

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

Metadata

Metadata

Labels

command:configscope:testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions