Skip to content

Commit c7d1129

Browse files
committed
updated db size tests due to fluctuating database sizes
1 parent 96665a3 commit c7d1129

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

features/db-size.feature

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ Feature: Display database size
55
Scenario: Display only database size for a WordPress install
66
Given a WP install
77

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;"`
9-
Then save STDOUT '(\d+)' as {DBSIZE}
10-
118
When I run `wp db size`
129
Then STDOUT should contain:
1310
"""
@@ -16,15 +13,12 @@ Feature: Display database size
1613

1714
And STDOUT should contain:
1815
"""
19-
{DBSIZE} KB
16+
KB
2017
"""
2118

2219
Scenario: Display only table sizes for a WordPress install
2320
Given a WP install
2421

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;"`
26-
Then save STDOUT '(\d+)' as {DBSIZE}
27-
2822
When I run `wp db size --tables`
2923
Then STDOUT should contain:
3024
"""
@@ -39,41 +33,19 @@ Feature: Display database size
3933
Scenario: Display only database size in bytes for a WordPress install
4034
Given a WP install
4135

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-
4536
When I run `wp db size --size_format=b`
4637
Then STDOUT should be a number
4738

48-
And STDOUT should be:
49-
"""
50-
{DBSIZE}
51-
"""
5239

5340
Scenario: Display only database size in kilobytes for a WordPress install
5441
Given a WP install
5542

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-
5943
When I run `wp db size --size_format=kb`
6044
Then STDOUT should be a number
6145

62-
And STDOUT should be:
63-
"""
64-
{DBSIZE}
65-
"""
6646

6747
Scenario: Display only database size in megabytes for a WordPress install
6848
Given a WP install
6949

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;"`
71-
Then save STDOUT '(\d+)' as {DBSIZE}
72-
7350
When I run `wp db size --size_format=mb`
7451
Then STDOUT should be a number
75-
76-
And STDOUT should be:
77-
"""
78-
{DBSIZE}
79-
"""

0 commit comments

Comments
 (0)