Skip to content

Commit b4bdb19

Browse files
committed
Update some tests
1 parent c1a4c7b commit b4bdb19

4 files changed

Lines changed: 16 additions & 1 deletion

File tree

features/db-check.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Feature: Check the database
2121
When I run `wp db check --quiet`
2222
Then STDOUT should be empty
2323

24+
@require-mysql-or-mariadb
2425
Scenario: db check can explicitly pass --silent to mysqlcheck
2526
Given a WP install
2627

@@ -34,6 +35,7 @@ Feature: Check the database
3435
Success: Database checked.
3536
"""
3637

38+
@require-mysql-or-mariadb
3739
Scenario: Run db check with MySQL defaults to check the database
3840
Given a WP install
3941

features/db-import.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ Feature: Import a WordPress database
109109
wp db import
110110
"""
111111

112-
When I run `wp core config {CORE_CONFIG_SETTINGS}`
112+
# Skipping connection check for SQLite.
113+
When I run `wp core config --skip-check {CORE_CONFIG_SETTINGS}`
113114
Then STDOUT should not be empty
114115
And the wp-config.php file should exist
115116

features/db-query.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ Feature: Query the database with WordPress' MySQL config
1414
Error: Plugin loaded.
1515
"""
1616

17+
# TODO: When using SQLite the output format should be the same
1718
When I run `wp db query "SELECT COUNT(ID) FROM wp_users;"`
1819
Then STDOUT should be:
1920
"""
2021
COUNT(ID)
2122
1
2223
"""
2324

25+
# SQLite doesn't support the --html option nor different dbuser.
26+
@require-mysql-or-mariadb
2427
Scenario: Database querying with passed-in options
2528
Given a WP install
2629

@@ -38,6 +41,8 @@ Feature: Query the database with WordPress' MySQL config
3841
"""
3942
And STDOUT should be empty
4043

44+
# SQLite doesn't support the --html option nor different dbuser.
45+
@require-mysql-or-mariadb
4146
Scenario: Database querying with MySQL defaults and passed-in options
4247
Given a WP install
4348

features/db.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ Feature: Perform database operations
200200
error
201201
"""
202202
203+
@require-mysql-or-mariadb
203204
Scenario: db repair can explicitly pass --silent to mysqlcheck
204205
Given a WP install
205206
@@ -232,6 +233,11 @@ Feature: Perform database operations
232233
total
233234
"""
234235
236+
# SQLite doesn't support this flag.
237+
@require-mysql-or-mariadb
238+
Scenario: DB Query with --skip-column-names
239+
Given a WP install
240+
235241
When I run `wp db query 'SELECT * FROM wp_options WHERE option_name="home"' --skip-column-names`
236242
Then STDOUT should not contain:
237243
"""
@@ -314,6 +320,7 @@ Feature: Perform database operations
314320
Success: Exported
315321
"""
316322
323+
@require-mysql-or-mariadb
317324
Scenario: Persist DB charset and collation
318325
Given an empty directory
319326
And WP files

0 commit comments

Comments
 (0)