Skip to content

Commit 09560b9

Browse files
committed
Add default values for user & pass
1 parent c589829 commit 09560b9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bin/install-package-tests

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ if [ -n "$WP_CLI_TEST_DBROOTPASS" ]; then
3131
PASSWORD_STRING="-p$WP_CLI_TEST_DBROOTPASS"
3232
fi
3333

34+
TEST_USER=wp_cli_test
35+
if [ -n "$WP_CLI_TEST_DBUSER" ]; then
36+
TEST_USER="$WP_CLI_TEST_DBUSER"
37+
fi
38+
39+
TEST_PASSWORD=password1
40+
if [ -n "$WP_CLI_TEST_DBPASS" ]; then
41+
TEST_PASSWORD="$WP_CLI_TEST_DBPASS"
42+
fi
43+
3444
# Prepare the database for running the tests with a MySQL version 8.0 or higher.
3545
install_db_8_0_plus() {
3646
mysql -e "CREATE DATABASE IF NOT EXISTS \`wp_cli_test\`;" $HOST_STRING -u"$USER" "$PASSWORD_STRING"

0 commit comments

Comments
 (0)