Skip to content

Commit e8617c1

Browse files
authored
Merge pull request #5895 from wp-cli/fix/5892-skip-column-statistics-test
2 parents f2b0446 + 1adee9d commit e8617c1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

features/utils.feature

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,12 @@ Feature: Utilities that do NOT depend on WordPress code
156156
When I try `mysql --database={DB_NAME} --user={DB_USER} --password={DB_PASSWORD} {DB_HOST_STRING} < test_db.sql`
157157
Then the return code should be 0
158158
159+
# The --skip-column-statistics flag is not always present.
160+
When I try `mysqldump --help | grep -q 'column-statistics' && echo '--skip-column-statistics'`
161+
Then save STDOUT as {SKIP_COLUMN_STATISTICS_FLAG}
162+
159163
# This throws a warning because of the password.
160-
When I try `{INVOKE_WP_CLI_WITH_PHP_ARGS--dmemory_limit=50M -ddisable_functions=ini_set} eval '\WP_CLI\Utils\run_mysql_command("/usr/bin/env mysqldump --skip-column-statistics --no-tablespaces {DB_NAME}", [ "user" => "{DB_USER}", "pass" => "{DB_PASSWORD}", "host" => "{DB_HOST}" ], null, true);'`
164+
When I try `{INVOKE_WP_CLI_WITH_PHP_ARGS--dmemory_limit=50M -ddisable_functions=ini_set} eval '\WP_CLI\Utils\run_mysql_command("/usr/bin/env mysqldump {SKIP_COLUMN_STATISTICS_FLAG} --no-tablespaces {DB_NAME}", [ "user" => "{DB_USER}", "pass" => "{DB_PASSWORD}", "host" => "{DB_HOST}" ], null, true);'`
161165
Then the return code should be 0
162166
And STDOUT should not be empty
163167
And STDOUT should contain:

0 commit comments

Comments
 (0)