You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bin/install-package-tests
+16-7Lines changed: 16 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -42,29 +42,38 @@ if [ -n "$WP_CLI_TEST_DBPASS" ]; then
42
42
fi
43
43
44
44
# Prepare the database for running the tests with a MySQL version 8.0 or higher.
45
-
install_db_8_0_plus() {
45
+
install_mysql_db_8_0_plus() {
46
+
set -ex
46
47
mysql -e "CREATE DATABASE IF NOT EXISTS \`wp_cli_test\`;"$HOST_STRING -u"$USER""$PASSWORD_STRING"
47
48
mysql -e "CREATE USER IF NOT EXISTS \`wp_cli_test\`@'%' IDENTIFIED WITH mysql_native_password BY '$TEST_PASSWORD'"$HOST_STRING -u"$USER""$PASSWORD_STRING"
48
49
mysql -e "GRANT ALL PRIVILEGES ON \`wp_cli_test\`.* TO '$TEST_USER'@'%'"$HOST_STRING -u"$USER""$PASSWORD_STRING"
49
50
mysql -e "GRANT ALL PRIVILEGES ON \`wp_cli_test_scaffold\`.* TO '$TEST_USER'@'%'"$HOST_STRING -u"$USER""$PASSWORD_STRING"
50
51
}
51
52
52
53
# Prepare the database for running the tests with a MySQL version lower than 8.0.
53
-
install_db_lower_than_8_0() {
54
+
install_mysql_db_lower_than_8_0() {
55
+
set -ex
54
56
mysql -e "CREATE DATABASE IF NOT EXISTS \`wp_cli_test\`;"$HOST_STRING -u"$USER""$PASSWORD_STRING"
55
57
mysql -e "GRANT ALL ON \`wp_cli_test\`.* TO '$TEST_USER'@'%' IDENTIFIED BY '$TEST_PASSWORD'"$HOST_STRING -u"$USER""$PASSWORD_STRING"
56
58
mysql -e "GRANT ALL ON \`wp_cli_test_scaffold\`.* TO '$TEST_USER'@'%' IDENTIFIED BY '$TEST_PASSWORD'"$HOST_STRING -u"$USER""$PASSWORD_STRING"
0 commit comments