File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,25 @@ Feature: Check the database
1313 Success: Database checked.
1414 """
1515
16+ Scenario : db check with --quiet flag should only show errors
17+ Given a WP install
18+
19+ When I run `wp db check --quiet`
20+ Then STDOUT should be empty
21+
22+ Scenario : db check can explicitly pass --silent to mysqlcheck
23+ Given a WP install
24+
25+ When I run `wp db check --silent`
26+ Then STDOUT should not contain:
27+ """
28+ wp_cli_test.wp_users
29+ """
30+ And STDOUT should contain:
31+ """
32+ Success: Database checked.
33+ """
34+
1635 Scenario : Run db check with MySQL defaults to check the database
1736 Given a WP install
1837
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -185,6 +185,51 @@ Feature: Perform database operations
185185 """
186186 And STDOUT should not be empty
187187
188+ Scenario: db optimize with --quiet flag should only show errors
189+ Given a WP install
190+
191+ When I run `wp db optimize --quiet`
192+ Then STDOUT should not contain:
193+ """
194+ error
195+ """
196+
197+
198+ Scenario: db optimize can explicitly pass --silent to mysqlcheck
199+ Given a WP install
200+
201+ When I run `wp db optimize --silent`
202+ Then STDOUT should not contain:
203+ """
204+ wp_cli_test.wp_users
205+ """
206+ And STDOUT should contain:
207+ """
208+ Success: Database optimized.
209+ """
210+
211+ Scenario: db repair with --quiet flag should only show errors
212+ Given a WP install
213+
214+ When I run `wp db repair --quiet`
215+ Then STDOUT should not contain:
216+ """
217+ error
218+ """
219+
220+ Scenario: db repair can explicitly pass --silent to mysqlcheck
221+ Given a WP install
222+
223+ When I run `wp db repair --silent`
224+ Then STDOUT should not contain:
225+ """
226+ error
227+ """
228+ And STDOUT should contain:
229+ """
230+ Success: Database repaired.
231+ """
232+
188233 Scenario: DB Query
189234 Given a WP install
190235
@@ -334,7 +379,7 @@ Feature: Perform database operations
334379 """
335380 Query succeeded. Rows affected: 1
336381 """
337-
382+
338383 When I run `wp db query "SELECT * FROM wp_users WHERE ID = 1"`
339384 Then STDOUT should not contain:
340385 """
You can’t perform that action at this time.
0 commit comments