WPUnit tests installed via WPUnit helpers will fail because the default db user requires a password now. A workaround I've implemented in Pantheon HUD is adding a step that changes the password back to empty:
- name: Reset MariaDB root password to empty
run: |
until mysqladmin ping -h127.0.0.1 -uroot -proot --silent; do
sleep 1
done
mysql -h127.0.0.1 -uroot -proot <<'SQL'
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
FLUSH PRIVILEGES;
SQL
mysqladmin ping -h127.0.0.1 -uroot --silent
This is a fine band-aid, but ideally this should be handled in WPUnit Helpers. However, I don't like making an update that makes something less secure (even though, arguably, a known password vs an empty password is sort of sixes in terms of actual security for a database environment that's going to be torn down anyway), so I propose:
WPUnit tests installed via WPUnit helpers will fail because the default db user requires a password now. A workaround I've implemented in Pantheon HUD is adding a step that changes the password back to empty:
This is a fine band-aid, but ideally this should be handled in WPUnit Helpers. However, I don't like making an update that makes something less secure (even though, arguably, a known password vs an empty password is sort of sixes in terms of actual security for a database environment that's going to be torn down anyway), so I propose:
implementing the workaround into a new minor point release of the packagecreating a major version release in whichuse_empty_db_passwordis a flag that can be toggledadditionally, allowdb_root_pwto be a flag that can be setroot