{{ message }}
Fix MariaDB test failures caused by ssl-verify-server-cert warnings in STDERR#231
Draft
Fix MariaDB test failures caused by ssl-verify-server-cert warnings in STDERR#231
Conversation
Agent-Logs-Url: https://github.com/wp-cli/.github/sessions/c36fe78c-cf30-4dea-bdb3-fa2d47816735 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix MariaDB tests to pass SSL verification
Fix MariaDB test failures caused by ssl-verify-server-cert warnings in STDERR
Mar 27, 2026
Member
…er-cert warnings Agent-Logs-Url: https://github.com/wp-cli/.github/sessions/ffe107ab-bf0d-425c-b414-3366b78154ce Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

MariaDB 11.4+ prints
WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login.to STDERR whenever WP-CLI invokesmysql/mysqldumpusingMYSQL_PWDover a TCP connection. This contaminates STDERR and causes Behat steps usingWhen I runto throwRuntimeException, failing most MariaDB tests.The warning fires only when all of these conditions are true:
MYSQL_PWDis set,ssl-verify-server-certis not explicitly configured (bypassed by--no-defaults), and the protocol is TCP. The existing[client] disable-ssl-verify-server-certinmy-cnfwas also ineffective since--no-defaultsbypasses all config files.Changes
[client] disable-ssl-verify-server-certlines frommy-cnf(were always bypassed by--no-defaults)Configure MariaDB to connect via Unix socket— runs only wheninputs.dbtype == 'mariadb'; overridesWP_CLI_TEST_DBHOSTto use the Unix socket path instead of TCP:WP-CLI already handles the
localhost:/path/to/socketformat inmysql_host_to_cli_args(), extracting the socket path and passing--socket=...tomysql/mysqldump. Since Unix socket is not TCP, the MariaDB warning condition is never met and no warning is printed — for every mysql tool call made during the test run.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.