Skip to content

Commit 54be7a7

Browse files
committed
Update some tests
1 parent 5c63df1 commit 54be7a7

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

features/db-export.feature

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Feature: Export a WordPress database
2020
"""
2121
And the wp_cli_test.sql file should exist
2222

23-
@require-mysql-or-mariadb
23+
@skip-sqlite
2424
Scenario: Exclude tables when exporting the database
2525
Given a WP install
2626

@@ -29,7 +29,7 @@ Feature: Export a WordPress database
2929
And the contents of the wp_cli_test.sql file should not match /CREATE TABLE ["`]?wp_users["`]?/
3030
And the contents of the wp_cli_test.sql file should match /CREATE TABLE ["`]?wp_options["`]?/
3131

32-
@require-mysql-or-mariadb
32+
@skip-sqlite
3333
Scenario: Include only specific tables when exporting the database
3434
Given a WP install
3535

@@ -46,8 +46,8 @@ Feature: Export a WordPress database
4646
When I try `wp db export wp_cli_test.sql --exclude_tables=wp_users --porcelain`
4747
Then the wp_cli_test.sql file should exist
4848
And the contents of the wp_cli_test.sql file should not match /_mysql_data_types_cache/
49-
And the contents of the wp_cli_test.sql file should not match /CREATE TABLE IF NOT EXISTS ["`]?wp_users["`]?/
50-
And the contents of the wp_cli_test.sql file should match /CREATE TABLE IF NOT EXISTS ["`]?wp_options["`]?/
49+
And the contents of the wp_cli_test.sql file should not match /CREATE TABLE ["`]?wp_users["`]?/
50+
And the contents of the wp_cli_test.sql file should match /CREATE TABLE ["`]?wp_options["`]?/
5151

5252
@require-sqlite
5353
Scenario: Include only specific tables when exporting the database
@@ -56,9 +56,9 @@ Feature: Export a WordPress database
5656
When I try `wp db export wp_cli_test.sql --tables=wp_users --porcelain`
5757
Then the wp_cli_test.sql file should exist
5858
And the contents of the wp_cli_test.sql file should not match /_mysql_data_types_cache/
59-
And the contents of the wp_cli_test.sql file should match /CREATE TABLE IF NOT EXISTS ["`]?wp_users["`]?/
60-
And the contents of the wp_cli_test.sql file should not match /CREATE TABLE IF NOT EXISTS ["`]?wp_posts["`]?/
61-
And the contents of the wp_cli_test.sql file should not match /CREATE TABLE IF NOT EXISTS ["`]?wp_options["`]?/
59+
And the contents of the wp_cli_test.sql file should match /CREATE TABLE ["`]?wp_users["`]?/
60+
And the contents of the wp_cli_test.sql file should not match /CREATE TABLE ["`]?wp_posts["`]?/
61+
And the contents of the wp_cli_test.sql file should not match /CREATE TABLE ["`]?wp_options["`]?/
6262

6363
@require-sqlite
6464
Scenario: Export database to STDOUT
@@ -70,7 +70,7 @@ Feature: Export a WordPress database
7070
PRAGMA foreign_keys=OFF
7171
"""
7272

73-
@require-mysql-or-mariadb
73+
@skip-sqlite
7474
Scenario: Export database to STDOUT
7575
Given a WP install
7676

@@ -79,7 +79,7 @@ Feature: Export a WordPress database
7979
"""
8080
-- Dump completed on
8181
"""
82-
@require-mysql-or-mariadb
82+
@skip-sqlite
8383
Scenario: Export database with mysql defaults to STDOUT
8484
Given a WP install
8585

@@ -89,7 +89,7 @@ Feature: Export a WordPress database
8989
-- Dump completed on
9090
"""
9191

92-
@require-mysql-or-mariadb
92+
@skip-sqlite
9393
Scenario: Export database with mysql --no-defaults to STDOUT
9494
Given a WP install
9595

@@ -99,7 +99,7 @@ Feature: Export a WordPress database
9999
-- Dump completed on
100100
"""
101101

102-
@require-mysql-or-mariadb
102+
@skip-sqlite
103103
Scenario: Export database with passed-in options
104104
Given a WP install
105105

@@ -135,7 +135,7 @@ Feature: Export a WordPress database
135135
Access denied
136136
"""
137137

138-
@require-mysql-or-mariadb
138+
@skip-sqlite
139139
Scenario: MySQL defaults are available as appropriate with --defaults flag
140140
Given a WP install
141141

features/db.feature

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Feature: Perform database operations
22

3-
@require-mysql-or-mariadb
3+
@skip-sqlite
44
Scenario: DB CRUD
55
Given an empty directory
66
And WP files
@@ -53,7 +53,7 @@ Feature: Perform database operations
5353
Are you sure you want to reset the 'wp_cli_test' database? [y/n] Success: Database reset.
5454
"""
5555
56-
@require-mysql-or-mariadb
56+
@skip-sqlite
5757
Scenario: DB CRUD with passed-in dbuser/dbpass
5858
Given an empty directory
5959
And WP files
@@ -109,7 +109,7 @@ Feature: Perform database operations
109109
"""
110110
And STDOUT should be empty
111111
112-
@require-mysql-or-mariadb
112+
@skip-sqlite
113113
Scenario: Clean up a WordPress install without dropping its database entirely but tables with prefix.
114114
Given a WP install
115115
@@ -141,7 +141,7 @@ Feature: Perform database operations
141141
"""
142142
And the return code should be 0
143143
144-
@require-mysql-or-mariadb
144+
@skip-sqlite
145145
Scenario: DB Operations
146146
Given a WP install
147147
@@ -151,7 +151,7 @@ Feature: Perform database operations
151151
When I run `wp db repair`
152152
Then STDOUT should not be empty
153153
154-
@require-mysql-or-mariadb
154+
@skip-sqlite
155155
Scenario: DB Operations with passed-in options
156156
Given a WP install
157157
@@ -190,7 +190,7 @@ Feature: Perform database operations
190190
"""
191191
And STDOUT should not be empty
192192
193-
@require-mysql-or-mariadb
193+
@skip-sqlite
194194
Scenario: db repair with --quiet flag should only show errors
195195
Given a WP install
196196
@@ -200,7 +200,7 @@ Feature: Perform database operations
200200
error
201201
"""
202202
203-
@require-mysql-or-mariadb
203+
@skip-sqlite
204204
Scenario: db repair can explicitly pass --silent to mysqlcheck
205205
Given a WP install
206206
@@ -246,7 +246,7 @@ Feature: Perform database operations
246246
home
247247
"""
248248
249-
@require-mysql-or-mariadb
249+
@skip-sqlite
250250
Scenario: DB export/import
251251
Given a WP install
252252
@@ -295,7 +295,7 @@ Feature: Perform database operations
295295
1
296296
"""
297297
298-
@require-mysql-or-mariadb
298+
@skip-sqlite
299299
Scenario: DB export no charset
300300
Given an empty directory
301301
And WP files
@@ -318,7 +318,7 @@ Feature: Perform database operations
318318
Success: Exported
319319
"""
320320
321-
@require-mysql-or-mariadb
321+
@skip-sqlite
322322
Scenario: Persist DB charset and collation
323323
Given an empty directory
324324
And WP files
@@ -362,7 +362,7 @@ Feature: Perform database operations
362362
latin1_spanish_ci
363363
"""
364364
365-
@require-mysql-or-mariadb
365+
@skip-sqlite
366366
Scenario: Row modifying queries should return the number of affected rows
367367
Given a WP install
368368
When I run `wp db query "UPDATE wp_users SET user_status = 1 WHERE ID = 1"`

0 commit comments

Comments
 (0)