| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…s login warning Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Codecov Report❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
📢 Thoughts on this report? Let us know! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
MariaDB tests were failing due to SSL warnings cluttering STDERR: WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. These warnings trigger Behat test failures even when commands succeed.
Changes
The flag is only added if not already present in user arguments, preserving override capability. MySQL installations are unaffected.
Mirrors the fix from wp-cli/wp-cli-tests#297, extending it to all db commands (export, import, query, etc.).
Original promptThis section details on the original issue you should resolve
<issue_title>Improve MariaDB tests</issue_title>
<issue_description>They are still allowed to fail but would be nice to get them to green. There are currently quite a few failing tests, almost all because of --ssl-verify-server-cert warnings cluttering STDERR.
Perhaps we need to pass it manually like was done in wp-cli/wp-cli-tests#297?
Examples:
Failed steps: 001 Scenario: Display information about a non default WordPress table # features/db-columns.feature:44 And I run `wp db query "CREATE TABLE not_wp ( date DATE NOT NULL, awesome_stuff TEXT, PRIMARY KEY (date) );;"` # features/db-columns.feature:46 $ wp db query "CREATE TABLE not_wp ( date DATE NOT NULL, awesome_stuff TEXT, PRIMARY KEY (date) );;" WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. cwd: /tmp/wp-cli-test-run--6987f0c7c6bcc3.53632177/ run time: 0.16866993904114 exit status: 0 (RuntimeException) 002 Scenario: Database exports with random hash applied # features/db-export.feature:3 When I run `wp db export --porcelain` # features/db-export.feature:6 $ wp db export --porcelain wp_cli_test-2026-02-08-68c4205.sql WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. cwd: /tmp/wp-cli-test-run--6987f0c848a357.72059523/ run time: 0.19305086135864 exit status: 0 (RuntimeException) 003 Scenario: Database export to a specified file path # features/db-export.feature:13 When I run `wp db export wp_cli_test.sql --porcelain` # features/db-export.feature:16 $ wp db export wp_cli_test.sql --porcelain wp_cli_test.sql WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. cwd: /tmp/wp-cli-test-run--6987f0c8c233a4.45982247/ run time: 0.19237279891968 exit status: 0 (RuntimeException) 004 Scenario: Exclude tables when exporting the database # features/db-export.feature:23 When I run `wp db export wp_cli_test.sql --exclude_tables=wp_users --porcelain` # features/db-export.feature:26 $ wp db export wp_cli_test.sql --exclude_tables=wp_users --porcelain wp_cli_test.sql WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. cwd: /tmp/wp-cli-test-run--6987f0c94b0ca7.31860636/ run time: 0.18274307250977 exit status: 0 (RuntimeException) 005 Scenario: Export database to STDOUT # features/db-export.feature:37 When I run `wp db export -` # features/db-export.feature:40 $ wp db export - WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. cwd: /tmp/wp-cli-test-run--6987f0c9c54811.18958571/ run time: 0.19263005256653 exit status: 0 (RuntimeException) 006 Scenario: Export database with mysql defaults to STDOUT # features/db-export.feature:46 When I run `wp db export --defaults -` # features/db-export.feature:49 $ wp db export --defaults - WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. cwd: /tmp/wp-cli-test-run--6987f0c9c54811.18958571/ run time: 0.19263005256653 exit status: 0 (RuntimeException) 008 Scenario: Export database with passed-in options # features/db-export.feature:64 When I run `wp db export - --dbpass=password1 --skip-comments` # features/db-export.feature:67 $ wp db export - --dbpass=password1 --skip-comments WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. cwd: /tmp/wp-cli-test-run--6987f0cb900c03.97350758/ run time: 0.18559980392456 exit status: 0 (RuntimeException) 009 Scenario: Import from database name path by default # features/db-import.feature:3 When I run `wp db export wp_cli_test.sql` # features/db-import.feature:6 $ wp db export wp_cli_test.sql Success: Exported to 'wp_cli_test.sql'. WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. cwd: /tmp/wp-cli-test-run--6987f0cd0bbfc5.61320675/ run time: 0.18721199035645 exit status: 0 (RuntimeException) 010 Scenario: Import from database name path by default with mysql defaults # features/db-import.feature:15 When I run `wp db export wp_cli_test.sql` # features/db-import.feature:18 $ wp db export wp_cli_test.sql Success: Exported to 'wp_cli_test.sql'. WARNING: option --ssl-verify-server-cert is dis... </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes wp-cli/db-command#309 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).