You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/db-size.feature
+1-29Lines changed: 1 addition & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,6 @@ Feature: Display database size
5
5
Scenario: Display only database size for a WordPress install
6
6
Given a WP install
7
7
8
-
When I run `wp db query "SELECT CEILING( SUM(data_length + index_length) / 1024 ) as Size FROM information_schema.TABLES where table_schema = 'wp_cli_test' GROUP BY table_schema;"`
Scenario: Display only table sizes for a WordPress install
23
20
Given a WP install
24
21
25
-
When I run `wp db query "SELECT SUM(data_length + index_length) FROM information_schema.TABLES where table_schema = 'wp_cli_test' GROUP BY table_schema;"`
Scenario: Display only database size in bytes for a WordPress install
40
34
Given a WP install
41
35
42
-
When I run `wp db query "SELECT SUM(data_length + index_length) as Size FROM information_schema.TABLES where table_schema = 'wp_cli_test' GROUP BY table_schema;"`
43
-
Then save STDOUT '(\d+)' as {DBSIZE}
44
-
45
36
When I run `wp db size --size_format=b`
46
37
Then STDOUT should be a number
47
38
48
-
And STDOUT should be:
49
-
"""
50
-
{DBSIZE}
51
-
"""
52
39
53
40
Scenario: Display only database size in kilobytes for a WordPress install
54
41
Given a WP install
55
42
56
-
When I run `wp db query "SELECT CEILING( SUM(data_length + index_length) / 1024 ) as Size FROM information_schema.TABLES where table_schema = 'wp_cli_test' GROUP BY table_schema;"`
57
-
Then save STDOUT '(\d+)' as {DBSIZE}
58
-
59
43
When I run `wp db size --size_format=kb`
60
44
Then STDOUT should be a number
61
45
62
-
And STDOUT should be:
63
-
"""
64
-
{DBSIZE}
65
-
"""
66
46
67
47
Scenario: Display only database size in megabytes for a WordPress install
68
48
Given a WP install
69
49
70
-
When I run `wp db query "SELECT CEILING( SUM(data_length + index_length) / 1048576 ) as Size FROM information_schema.TABLES where table_schema = 'wp_cli_test' GROUP BY table_schema;"`
0 commit comments