File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 22
33set -ex
44
5+ PASSWORD_STRING=" "
6+ if [ -z " DB_PASSWORD" ]; then
7+ PASSWORD_STRING=" -p${DB_PASSWORD} "
8+ fi ;
9+
510# Prepare the database for running the tests
611install_db () {
7- mysql -e ' CREATE DATABASE IF NOT EXISTS wp_cli_test;' -uroot -p ${DB_PASSWORD}
8- mysql -e ' CREATE USER "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot -p ${DB_PASSWORD}
9- mysql -e ' GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost"' -uroot -p ${DB_PASSWORD}
10- mysql -e ' GRANT ALL PRIVILEGES ON wp_cli_test_scaffold.* TO "wp_cli_test"@"localhost"' -uroot -p ${DB_PASSWORD}
12+ mysql -e ' CREATE DATABASE IF NOT EXISTS wp_cli_test;' -uroot " $PASSWORD_STRING "
13+ mysql -e ' CREATE USER "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot " $PASSWORD_STRING "
14+ mysql -e ' GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost"' -uroot " $PASSWORD_STRING "
15+ mysql -e ' GRANT ALL PRIVILEGES ON wp_cli_test_scaffold.* TO "wp_cli_test"@"localhost"' -uroot " $PASSWORD_STRING "
1116}
1217
1318install_db
You can’t perform that action at this time.
0 commit comments